MySQL 9.6.0
Source Code Documentation
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp > Class Template Reference

Storage for boundary points, backed by a std::map. More...

#include <map_boundary_storage.h>

Inheritance diagram for mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >:
[legend]

Classes

struct  Make_pair_reverse
 

Public Types

using Set_traits_t = Set_traits_tp
 
using Map_t = Map_tp
 
using Basic_container_wrapper_t = mysql::containers::Basic_container_wrapper< This_t, Map_t >
 
using Element_t = typename Set_traits_t::Element_t
 
using Map_value_t = mysql::ranges::Range_value_type< Map_t >
 
using Memory_resource_t = mysql::allocators::Memory_resource
 
using Allocator_t = mysql::allocators::Allocator< Map_value_t >
 
using Map_iterator_t = mysql::ranges::Range_iterator_type< Map_t >
 
using Map_const_iterator_t = mysql::ranges::Range_const_iterator_type< Map_t >
 
using Iterator_t = detail::Map_boundary_iterator< Map_iterator_t >
 
using Const_iterator_t = detail::Map_boundary_iterator< Map_const_iterator_t, Map_iterator_t >
 
- Public Types inherited from mysql::containers::Basic_container_wrapper< Map_boundary_storage< Set_traits_tp, Map_tp >, Map_tp >
using Wrapped_t = Map_tp
 
- Public Types inherited from mysql::sets::Upper_lower_bound_interface< Map_boundary_storage< Set_traits_tp, Map_tp >, Set_traits_tp, detail::Map_boundary_iterator< mysql::ranges::Range_iterator_type< Map_tp > >, detail::Map_boundary_iterator< mysql::ranges::Range_const_iterator_type< Map_tp >, mysql::ranges::Range_iterator_type< Map_tp > >, Iterator_get_value >
using Iterator_t = Iterator_tp
 
using Const_iterator_t = Const_iterator_tp
 
using Set_traits_t = Set_traits_tp
 
using Iterator_getter_t = Iterator_getter_tp
 
using Element_t = typename Set_traits_t::Element_t
 

Public Member Functions

 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_storageoperator= (const Map_boundary_storage &other)=default
 
Map_boundary_storageoperator= (Map_boundary_storage &&other) noexcept=default
 
 ~Map_boundary_storage ()=default
 
Map_boundary_storageoperator= (const Is_boundary_storage_over_traits< Set_traits_t > auto &source)
 Assignment operator copying from another type, preserving the existing Memory_resource. More...
 
Map_tmap ()
 
const Map_tmap () 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...
 
- Public Member Functions inherited from mysql::containers::Basic_container_wrapper< Map_boundary_storage< Set_traits_tp, Map_tp >, Map_tp >
 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
 
- Public Member Functions inherited from mysql::ranges::Collection_interface< Self_tp >
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...
 
- Public Member Functions inherited from mysql::sets::Upper_lower_bound_interface< Map_boundary_storage< Set_traits_tp, Map_tp >, Set_traits_tp, detail::Map_boundary_iterator< mysql::ranges::Range_iterator_type< Map_tp > >, detail::Map_boundary_iterator< mysql::ranges::Range_const_iterator_type< Map_tp >, mysql::ranges::Range_iterator_type< Map_tp > >, Iterator_get_value >
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...
 

Static Public Member Functions

template<mysql::meta::Is_same_ignore_const< This_t > This_arg_t>
static auto upper_bound_impl (This_arg_t &self, const Element_t &element)
 
template<mysql::meta::Is_same_ignore_const< This_t > This_arg_t>
static auto lower_bound_impl (This_arg_t &self, const Element_t &element)
 
- Static Public Member Functions inherited from mysql::sets::Upper_lower_bound_interface< Map_boundary_storage< Set_traits_tp, Map_tp >, Set_traits_tp, detail::Map_boundary_iterator< mysql::ranges::Range_iterator_type< Map_tp > >, detail::Map_boundary_iterator< mysql::ranges::Range_const_iterator_type< Map_tp >, mysql::ranges::Range_iterator_type< Map_tp > >, Iterator_get_value >
static constexpr Iter_t lower_bound_dispatch (Self_arg_t &self_arg, const Iter_t &hint, const Element_t &element)
 Implements the lower_bound functions with hint defined above, checking if the hint is already the correct answer, and otherwise delegating to the implementing class. More...
 
static constexpr auto lower_bound_dispatch (Self_arg_t &self_arg, const Element_t &element)
 Implements the lower_bound functions without hint defined above. More...
 
static constexpr Iter_t upper_bound_dispatch (Self_arg_t &self_arg, const Iter_t &hint, const Element_t &element)
 Implements the upper_bound functions with hint defined above, checking if the hint is already the correct answer, and otherwise delegating to the implementing class. More...
 
static constexpr auto upper_bound_dispatch (Self_arg_t &self_arg, const Element_t &element)
 Implements the upper_bound functions without hint defined above. More...
 

Static Public Attributes

static constexpr bool has_fast_insertion = true
 Declare that insertion is "fast", i.e., O(log(N)). More...
 

Private Types

using This_t = Map_boundary_storage< Set_traits_tp, Map_tp >
 

Private Member Functions

Iterator_t do_insert (const Iterator_t &position, const Element_t &v1, const Element_t &v2, const auto &inserter)
 Insert two boundary points. More...
 

Static Private Member Functions

static constexpr bool lt (const Element_t &left, const Element_t &right)
 Return true if "left < right", according to the order defined by Set_traits_t. More...
 
static constexpr bool le (const Element_t &left, const Element_t &right)
 Return true if "left <= right", according to the order defined by Set_traits_t. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mysql::containers::Basic_container_wrapper< Map_boundary_storage< Set_traits_tp, Map_tp >, Map_tp >
auto & wrapped () &noexcept
 
const auto & wrapped () const &noexcept
 
auto && wrapped () &&noexcept
 

Detailed Description

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_tpBounded set traits describing properties of the element type.
Map_tpClass for the map data structure, expected to have an API similar to std::map<Set_traits_tp::Element_t, Set_traits_tp::Element_t>.

Member Typedef Documentation

◆ Allocator_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Allocator_t = mysql::allocators::Allocator<Map_value_t>

◆ Basic_container_wrapper_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Basic_container_wrapper_t = mysql::containers::Basic_container_wrapper<This_t, Map_t>

◆ Const_iterator_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Const_iterator_t = detail::Map_boundary_iterator<Map_const_iterator_t, Map_iterator_t>

◆ Element_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Element_t = typename Set_traits_t::Element_t

◆ Iterator_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Iterator_t = detail::Map_boundary_iterator<Map_iterator_t>

◆ Map_const_iterator_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_const_iterator_t = mysql::ranges::Range_const_iterator_type<Map_t>

◆ Map_iterator_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_iterator_t = mysql::ranges::Range_iterator_type<Map_t>

◆ Map_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_t = Map_tp

◆ Map_value_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_value_t = mysql::ranges::Range_value_type<Map_t>

◆ Memory_resource_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Memory_resource_t = mysql::allocators::Memory_resource

◆ Set_traits_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Set_traits_t = Set_traits_tp

◆ This_t

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
using mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::This_t = Map_boundary_storage<Set_traits_tp, Map_tp>
private

Constructor & Destructor Documentation

◆ Map_boundary_storage() [1/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_boundary_storage ( const Memory_resource_t memory_resource = Memory_resource_t())
inlineexplicitnoexcept

Construct a new, empty object, with the given Memory_resource.

◆ Map_boundary_storage() [2/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_boundary_storage ( const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &  source,
const Memory_resource_t memory_resource 
)
inlineexplicit

Constructor copying from another type, using the given Memory_resource.

◆ Map_boundary_storage() [3/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_boundary_storage ( const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &  source)
inlineexplicit

Constructor copying both values and Memory_resource from another storage.

◆ Map_boundary_storage() [4/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
template<std::input_iterator First_iterator_t>
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::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() 
)
inlineexplicit

Constructor copying a range defined by the given iterators, using memory_resource if given, or the default Memory_resource() otherwise.

◆ Map_boundary_storage() [5/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_boundary_storage ( const Map_boundary_storage< Set_traits_tp, Map_tp > &  other)
default

◆ Map_boundary_storage() [6/6]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::Map_boundary_storage ( Map_boundary_storage< Set_traits_tp, Map_tp > &&  other)
defaultnoexcept

◆ ~Map_boundary_storage()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::~Map_boundary_storage ( )
default

Member Function Documentation

◆ assign() [1/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
template<std::input_iterator First_iterator_t>
void mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::assign ( const First_iterator_t &  first,
const std::sentinel_for< First_iterator_t > auto &  last 
)
inline

Assign from the range defined by the given iterators, preserving the existing Memory_resource.

◆ assign() [2/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
void mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::assign ( const Is_readable_boundary_storage_over_traits< Set_traits_t > auto &  other)
inline

Assign from another type, preserving the existing Memory_resource.

◆ begin() [1/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::begin ( )
inline
Returns
mutable iterator to the beginning.

◆ begin() [2/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::begin ( ) const
inline
Returns
const iterator to the beginning.

◆ do_insert()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Iterator_t mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::do_insert ( const Iterator_t position,
const Element_t v1,
const Element_t v2,
const auto &  inserter 
)
inlineprivate

Insert two boundary points.

This is the common worker function for the three-argument and four-argument public insert functions.

Parameters
positionInsertion point.
v1The first boundary point to insert.
v2The second boundary point to insert.
inserterCallable that will insert two boundary points with a given iterator hint.
Returns
Iterator to the next point after the inserted point.

◆ empty()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
bool mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::empty ( ) const
inline
Returns
true if this object is empty.

◆ end() [1/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::end ( )
inline
Returns
mutable iterator to the end.

◆ end() [2/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::end ( ) const
inline
Returns
const iterator to the end.

◆ erase()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Iterator_t mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::erase ( const Iterator_t left,
const Iterator_t right 
)
inline

Erase an even-length range of boundary points.

This invalidates iterators to any removed elements, and also, if left is an endpoint, invalidates iterators to std::prev(left).

Parameters
leftThe first boundary point to remove, inclusive.
rightThe last boundary point to remove, exclusive.
Returns
Iterator to the next point after the last removed point.
Note
It is required that left.is_endpoint() == right.is_endpoint().

◆ insert()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Iterator_t mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::insert ( const Iterator_t position,
const Element_t v1,
const Element_t v2 
)
inline

Insert two boundary points by allocating a new element.

Parameters
positionInsertion point.
v1The first boundary point to insert.
v2The second boundary point to insert.
Returns
Iterator to the next point after the inserted point.
Exceptions
bad_allocon OOM.

◆ le()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
static constexpr bool mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::le ( const Element_t left,
const Element_t right 
)
inlinestaticconstexprprivate

Return true if "left <= right", according to the order defined by Set_traits_t.

◆ lower_bound_impl()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
template<mysql::meta::Is_same_ignore_const< This_t > This_arg_t>
static auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::lower_bound_impl ( This_arg_t &  self,
const Element_t element 
)
inlinestatic
Returns
the lower bound for the given element in the given storage.

◆ lt()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
static constexpr bool mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::lt ( const Element_t left,
const Element_t right 
)
inlinestaticconstexprprivate

Return true if "left < right", according to the order defined by Set_traits_t.

◆ map() [1/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Map_t & mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::map ( )
inline

◆ map() [2/2]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
const Map_t & mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::map ( ) const
inline

◆ operator bool()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::operator bool ( ) const
inlineexplicit
Returns
true if this object is nonempty.

◆ operator=() [1/3]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Map_boundary_storage & mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::operator= ( const Is_boundary_storage_over_traits< Set_traits_t > auto &  source)
inline

Assignment operator copying from another type, preserving the existing Memory_resource.

◆ operator=() [2/3]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Map_boundary_storage & mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::operator= ( const Map_boundary_storage< Set_traits_tp, Map_tp > &  other)
default

◆ operator=() [3/3]

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Map_boundary_storage & mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::operator= ( Map_boundary_storage< Set_traits_tp, Map_tp > &&  other)
defaultnoexcept

◆ size()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::size ( ) const
inline
Returns
the number of boundary points.

◆ steal_and_insert()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Iterator_t mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::steal_and_insert ( const Iterator_t position,
const Element_t v1,
const Element_t v2,
This_t source 
)
inlinenoexcept

Insert two boundary points, stealing the first element from given source object (which must be nonempty).

Parameters
positionInsertion point.
v1The first boundary point to insert.
v2The second boundary point to insert.
sourceother Map_boundary_storage from which we may steal an element.
Returns
Iterator to the next point after the inserted point.

◆ update_point()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
Iterator_t mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::update_point ( const Iterator_t position,
const Element_t element 
)
inline

Modify the boundary that the iterator points to.

Parameters
positionElement to update.
elementNew value.
Returns
iterator to the next element. Note that this is different from position, and that position has been invalidated, in case position.is_endpoint()==true.

◆ upper_bound_impl()

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
template<mysql::meta::Is_same_ignore_const< This_t > This_arg_t>
static auto mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::upper_bound_impl ( This_arg_t &  self,
const Element_t element 
)
inlinestatic
Returns
the upper bound for the given element in the given storage.

Member Data Documentation

◆ has_fast_insertion

template<Is_bounded_set_traits Set_traits_tp, class Map_tp >
constexpr bool mysql::sets::throwing::Map_boundary_storage< Set_traits_tp, Map_tp >::has_fast_insertion = true
staticconstexpr

Declare that insertion is "fast", i.e., O(log(N)).


The documentation for this class was generated from the following file: