Lived once
struct Point { double lat; double lon; time_t when; }; which were stored in std::list (data is initially sorted by when ). It took an exception of duplicates in lat / lon , for which the list was converted to std :: set
bool operator < (const Point &point) const { return (this->lat < point.lat || this->lon < point.lon) && this->when < point.when; } Everything is good, but it is necessary that subsequent duplicates are not deleted, but old ones are overwritten.
map, and rewrite in the spirit ofm[x] = x... Formally speaking, you don’t have a lot of it, but a display of thelat/lonkey on thewhenvalue. Another option - search, delete and insert a new one? - Harrystd::set. - ixSci