I think OR-Tools uses a sorted `std::vector` for this in `SortedDisjointIntervalList` [1] (if I get your description of the problem right).
--
1: https://or-tools.github.io/docs/cpp/classoperations__researc...
--
1: https://or-tools.github.io/docs/cpp/classoperations__researc...