constexpr operator std::pair<X, Y>() const { return {begin(), end()}; }
constexpr bool empty() const { return begin() == end(); }
void sort() { std::stable_sort( base_.begin(), base_.end(), comparator() ); }
iterator_range &operator=(iterator_range<X, Y> rng) { begin() = detail::move(rng).begin(); end() = detail::move(rng).end(); return *this; }
std::pair< const_iterator, const_iterator > equal_range( key_type const& k) const { return std::equal_range( base_.begin(), base_.end(), k, comparator() ); }
const_iterator upper_bound( key_type const& k) const { return std::upper_bound( base_.begin(), base_.end(), k, comparator() ); }
iterator lower_bound( key_type const& k) { return std::lower_bound( base_.begin(), base_.end(), k, comparator() ); }
const_iterator end() const { return base_.end(); }
iterator end() { return base_.end(); }