fixup! Add implementation

This commit is contained in:
Bruno BELANYI 2024-08-24 19:29:09 +01:00
parent 8165fc6f99
commit bdccd17936

View file

@ -18,12 +18,10 @@ public:
auto const end_val = (*this)[end]; auto const end_val = (*this)[end];
underlying_.erase(underlying_.lower_bound(begin), underlying_.erase(underlying_.lower_bound(begin),
underlying_.upper_bound(end)); underlying_.upper_bound(end));
if (!((*this)[begin] == val)) { if (!((*this)[begin] == val))
underlying_.insert({begin, val}); underlying_.insert({begin, val});
} if (!((*this)[end] == end_val))
if (!((*this)[end] == end_val)) {
underlying_.insert({end, end_val}); underlying_.insert({end, end_val});
}
} }
V const& operator[](K const& key) const { V const& operator[](K const& key) const {