28 Apr
2015
28 Apr
'15
6:03 a.m.
The documentation for time_period suggests that for two periods tp1 and tp2, tp1 < tp2 if tp1.end() < tp2.begin() i.e. !tp1.intersects(tp2). http://www.boost.org/doc/libs/1_58_0/doc/html/date_time/posix_time.html#date... But I can see that the following works: time_period tp1(second_clock:local_time(), hours(2)); time_period tp2(second_clock:local_time() + hours(1), hours(2)); assert(tp1.intersects(tp2)); assert(tp1 < tp2); The behavior seems legit - tp1.begin() < tp2.begin()/ The documentation says nothing about overlapping periods. Arindam