1 #ifndef theplu_yat_utility_segment_set
2 #define theplu_yat_utility_segment_set
27 #include "SegmentTree.h"
29 #include "yat_assert.h"
45 template<
typename T,
class Compare = std::less<T> >
48 SegmentCompare<T, Compare> >,
50 Identity<const Segment<T, Compare>&> >
66 std::pair<typename me::iterator, typename me::iterator> p =
68 if (p.first==p.second) {
69 return this->
container_.insert(p.first, segment);
80 YAT_ASSERT(last==this->
end() || compare(segment, *last));
81 YAT_ASSERT(last!=this->
begin());
83 YAT_ASSERT(compare_3way(segment, *last)==0);
86 segment.begin(), comp),
87 std::max(last->end(), segment.end(), comp));