| 155 | struct timepoint |
| 156 | { |
| 157 | timepoint(string str) |
| 158 | { |
| 159 | vector<int> vals, hms {0, 0, 0}; |
| 160 | stringstream ss {str}; |
| 161 | for(string val; getline(ss, val, ':');) |
| 162 | vals.push_back(stoi(val)); |
| 163 | for(auto it_src {vals.rbegin()}, it_dest {hms.rbegin()}; it_src != vals.rend(); it_src++, it_dest++) |
| 164 | *it_dest = *it_src; |
| 165 | value = chrono::hours {hms[0]} + chrono::minutes{hms[1]} + chrono::seconds{hms[2]}; |
| 166 | } |
| 167 | bool operator < (const timepoint &o) { return value < o.value; } |
| 168 | bool operator > (const timepoint &o) { return value > o.value; } |
| 169 | //bool operator == (const timepoint &o) { return value == o.value; } |