|
| | Map_boundary_storage (const Memory_resource_t &memory_resource=Memory_resource_t()) noexcept |
| | Construct a new, empty object, with the given Memory_resource. More...
|
| |
| | Map_boundary_storage (const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &source, const Memory_resource_t &memory_resource) |
| | Constructor copying from another type, using the given Memory_resource. More...
|
| |
| | Map_boundary_storage (const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &source) |
| | Constructor copying both values and Memory_resource from another storage. More...
|
| |
| template<std::input_iterator First_iterator_t> |
| | Map_boundary_storage (const First_iterator_t &first, const std::sentinel_for< First_iterator_t > auto &last, const Memory_resource_t &memory_resource=Memory_resource_t()) |
| | Constructor copying a range defined by the given iterators, using memory_resource if given, or the default Memory_resource() otherwise. More...
|
| |
| | Map_boundary_storage (const Map_boundary_storage &other)=default |
| |
| | Map_boundary_storage (Map_boundary_storage &&other) noexcept=default |
| |
| Map_boundary_storage & | operator= (const Map_boundary_storage &other)=default |
| |
| Map_boundary_storage & | operator= (Map_boundary_storage &&other) noexcept=default |
| |
| | ~Map_boundary_storage ()=default |
| |
| Map_boundary_storage & | operator= (const Is_boundary_storage_over_traits< Set_traits_t > auto &source) |
| | Assignment operator copying from another type, preserving the existing Memory_resource. More...
|
| |
| Map_t & | map () |
| |
| const Map_t & | map () const |
| |
| void | assign (const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &other) |
| | Assign from another type, preserving the existing Memory_resource. More...
|
| |
| template<std::input_iterator First_iterator_t> |
| void | assign (const First_iterator_t &first, const std::sentinel_for< First_iterator_t > auto &last) |
| | Assign from the range defined by the given iterators, preserving the existing Memory_resource. More...
|
| |
| auto | begin () const |
| |
| auto | end () const |
| |
| auto | begin () |
| |
| auto | end () |
| |
| auto | size () const |
| |
| bool | empty () const |
| |
| | operator bool () const |
| |
| Iterator_t | erase (const Iterator_t &left, const Iterator_t &right) |
| | Erase an even-length range of boundary points. More...
|
| |
| Iterator_t | insert (const Iterator_t &position, const Element_t &v1, const Element_t &v2) |
| | Insert two boundary points by allocating a new element. More...
|
| |
| Iterator_t | steal_and_insert (const Iterator_t &position, const Element_t &v1, const Element_t &v2, This_t &source) noexcept |
| | Insert two boundary points, stealing the first element from given source object (which must be nonempty). More...
|
| |
| Iterator_t | update_point (const Iterator_t &position, const Element_t &element) |
| | Modify the boundary that the iterator points to. More...
|
| |
| | Basic_container_wrapper (Args_t &&...args) noexcept(noexcept(Wrapped_t(std::forward< Args_t >(args)...))) |
| | Constructor that delegates all parameters to the constructor of the wrapped class. More...
|
| |
| auto | assign (const First_iterator_t &first, const Sentinel_t &last) noexcept(mysql::utils::Shall_catch::no==mysql::utils::Shall_catch::yes||noexcept(std::declval< Wrapped_t >().assign(first, last))) |
| | Assign a range defined by the two iterators to the wrapped object. More...
|
| |
| auto | assign (const Other_t &other) noexcept(mysql::utils::Shall_catch::no==mysql::utils::Shall_catch::yes||noexcept(std::declval< Self_t >().assign(other.begin(), other.end()))) |
| | Copy-assign the other object to the wrapped object. More...
|
| |
| void | assign (Self_t &&other) noexcept |
| | Move-assign the other object to the wrapped object. More...
|
| |
| void | clear () noexcept |
| | Clear the wrapped object. More...
|
| |
| auto | get_memory_resource () const noexcept |
| | Return the memory resource used by the wrapped object. More...
|
| |
| auto | get_allocator () const noexcept |
| | Return the allocator used by the wrapped object. More...
|
| |
| auto | begin () noexcept |
| |
| auto | begin () const noexcept |
| |
| auto | end () noexcept |
| |
| auto | end () const noexcept |
| |
| auto | empty () const noexcept |
| |
| auto | size () const noexcept |
| |
| constexpr auto | cbegin () const |
| | Return constant iterator to the beginning. More...
|
| |
| constexpr auto | cend () const |
| | Return constant iterator to the end. More...
|
| |
| constexpr auto | rbegin () |
| | Return reverse iterator to the beginning. More...
|
| |
| constexpr auto | rend () |
| | Return reverse iterator to the end. More...
|
| |
| constexpr auto | rbegin () const |
| | Return const reverse iterator to the beginning. More...
|
| |
| constexpr auto | rend () const |
| | Return const reverse iterator to the end. More...
|
| |
| constexpr auto | crbegin () const |
| | Return const reverse iterator to the beginning. More...
|
| |
| constexpr auto | crend () const |
| | Return const reverse iterator to the end. More...
|
| |
| constexpr bool | empty () const |
| | Return true if the range is empty, i.e., begin() == end(). More...
|
| |
| constexpr | operator bool () const |
| | Return true if the range is non-empty, i.e., begin() != end(). More...
|
| |
| constexpr bool | operator! () const |
| | Return true if the range is empty, i.e., begin() == end(). More...
|
| |
| constexpr auto | size () const |
| | Return the number of elements in this view, unsigned (size_t), by computing std::ranges::distance(begin, end) More...
|
| |
| constexpr auto | ssize () const |
| | Return the number of elements in this view, signed (ptrdiff_t). More...
|
| |
| constexpr decltype(auto) | front () const |
| | Return the first element. More...
|
| |
| constexpr decltype(auto) | back () const |
| | Return the last element. Enabled if we have bidirectional iterators. More...
|
| |
| constexpr decltype(auto) | operator[] (std::ptrdiff_t n) |
| | Return the n'th element, possibly mutable. More...
|
| |
| constexpr decltype(auto) | operator[] (std::ptrdiff_t n) const |
| | Return the n'th element, const. More...
|
| |
| constexpr auto * | data () |
| | Return pointer to underlying contiguous memory. More...
|
| |
| constexpr auto * | data () const |
| | Return const pointer to underlying contiguous memory. More...
|
| |
| constexpr Iterator_t | lower_bound (const Iterator_t &hint, const Element_t &element) |
| | Return the lower bound for element, using an iterator hint known to be less than or equal to the correct result. More...
|
| |
| constexpr Const_iterator_t | lower_bound (const Const_iterator_t &hint, const Element_t &element) const |
| | Return the lower bound for element, using an iterator hint known to be less than or equal to the correct result. More...
|
| |
| constexpr Iterator_t | lower_bound (const Element_t &element) |
| | Return the lower bound for element. More...
|
| |
| constexpr Const_iterator_t | lower_bound (const Element_t &element) const |
| | Return the lower bound for element. More...
|
| |
| constexpr Iterator_t | upper_bound (const Iterator_t &hint, const Element_t &element) |
| | Return the upper bound for element, using an iterator hint known to be less than or equal to the correct result. More...
|
| |
| constexpr Const_iterator_t | upper_bound (const Const_iterator_t &hint, const Element_t &element) const |
| | Return the upper bound for element, using an iterator hint known to be less than or equal to the correct result. More...
|
| |
| constexpr Iterator_t | upper_bound (const Element_t &element) |
| | Return the upper bound for element. More...
|
| |
| constexpr Const_iterator_t | upper_bound (const Element_t &element) const |
| | Return the upper bound for element. More...
|
| |
template<Is_bounded_set_traits Set_traits_tp, class Map_tp>
class mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >
Storage for boundary points, backed by a std::map.
Internally, each interval is represented as a value pair in the map, where the key is the endpoint and the mapped value is the start. (This may appear "reversed". The reason is technical: some operations are faster this way. See comments in upper_bound_impl.)
Insertion is worst-case logarithmic-time, but amortized constant-time if an exact hint can be provided, which is possible when elements are inserted in order. Deletion is linear-time in the number of deleted elements, plus logarithmic-time in the total number of elements. upper_bound/lower_bound is worst-case logarithmic-time, but constant-time if given an exact hint. The iterator category is bidirectional_iterator.
- Template Parameters
-
| Set_traits_tp | Bounded set traits describing properties of the element type. |
| Map_tp | Class for the map data structure, expected to have an API similar to std::map<Set_traits_tp::Element_t, Set_traits_tp::Element_t>. |