Small helper that determines if the time windows of a and b overlap.
| 36 | |
| 37 | // Small helper that determines if the time windows of a and b overlap. |
| 38 | bool hasTimeOverlap(auto const &a, auto const &b) |
| 39 | { |
| 40 | // See https://stackoverflow.com/a/325964/4316405. |
| 41 | return a.twEarly <= b.twLate && a.twLate >= b.twEarly; |
| 42 | } |
| 43 | |
| 44 | bool hasTimeWindow(auto const &arg) |
| 45 | { |