CRTP base class (mixin) to define a set that has upper_bound and lower_bound members.
More...
|
| template<std::derived_from< Self_t > Self_arg_t, mysql::ranges::Is_iterator_for_range< Self_arg_t > Iter_t> |
| 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...
|
| |
| template<std::derived_from< Self_t > Self_arg_t> |
| 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...
|
| |
| template<std::derived_from< Self_t > Self_arg_t, mysql::ranges::Is_iterator_for_range< Self_arg_t > Iter_t> |
| 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...
|
| |
| template<std::derived_from< Self_t > Self_arg_t> |
| 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...
|
| |
template<class Self_tp, Is_ordered_set_traits Set_traits_tp, std::forward_iterator Iterator_tp, std::forward_iterator Const_iterator_tp, Is_getter_for_iterator< Iterator_tp > Iterator_getter_tp>
class mysql::sets::Upper_lower_bound_interface< Self_tp, Set_traits_tp, Iterator_tp, Const_iterator_tp, Iterator_getter_tp >
CRTP base class (mixin) to define a set that has upper_bound and lower_bound members.
Typically, the implementation defines two member functions: the static member functions upper_bound_impl and lower_bound_impl taking a hint, and this class provides all the other 12 functions.
The implementation needs to satisfy Is_upper_lower_bound_implementation. This class will provide const/non-const upper_bound/lower_bound member functions that take/don't take iterator hints.
It also provides static member functions upper_bound_dispatch/lower_bound_dispatch, which take either a const or a non-const instance in the first argument, and which take/don't take iterator hints.
template<class Self_tp , Is_ordered_set_traits Set_traits_tp, std::forward_iterator Iterator_tp, std::forward_iterator Const_iterator_tp, Is_getter_for_iterator< Iterator_tp > Iterator_getter_tp>
Return the lower bound for element, using an iterator hint known to be less than or equal to the correct result.
This is the const version of the function.
The hint may allow for optimizations. If no hint is known, use the hint-less function instead.
- Parameters
-
| hint | Iterator hint. This must be less than or equal to the correct result. |
| element | Value to query. |
- Returns
- Iterator to the first lower bound for
element, i.e., the first element that is greater than or equal to element, or to the end if no such element exists.
template<class Self_tp , Is_ordered_set_traits Set_traits_tp, std::forward_iterator Iterator_tp, std::forward_iterator Const_iterator_tp, Is_getter_for_iterator< Iterator_tp > Iterator_getter_tp>
Return the lower bound for element, using an iterator hint known to be less than or equal to the correct result.
This is the non-const version of the function.
The hint may allow for optimizations. If no hint is known, use the hint-less function instead.
- Parameters
-
| hint | Iterator hint. This must be less than or equal to the correct result. |
| element | Value to query. |
- Returns
- Iterator to the first lower bound for
element, i.e., the first element that is greater than or equal to element, or to the end if no such element exists.
template<class Self_tp , Is_ordered_set_traits Set_traits_tp, std::forward_iterator Iterator_tp, std::forward_iterator Const_iterator_tp, Is_getter_for_iterator< Iterator_tp > Iterator_getter_tp>
Return the upper bound for element, using an iterator hint known to be less than or equal to the correct result.
This is the const version of the function.
The hint may allow for optimizations. If no hint is known, use the hint-less function instead.
- Parameters
-
| hint | Iterator hint. This must be less than or equal to the correct result. |
| element | Value to query. |
- Returns
- Iterator to the first upper bound for
element, i.e., the first element that is strictly greater than element, or to the end if no such element exists.
template<class Self_tp , Is_ordered_set_traits Set_traits_tp, std::forward_iterator Iterator_tp, std::forward_iterator Const_iterator_tp, Is_getter_for_iterator< Iterator_tp > Iterator_getter_tp>
Return the upper bound for element, using an iterator hint known to be less than or equal to the correct result.
This is the non-const version of the function.
The hint may allow for optimizations. If no hint is known, use the hint-less function instead.
- Parameters
-
| hint | Iterator hint. This must be less than or equal to the correct result. |
| element | Value to query. |
- Returns
- Iterator to the first upper bound for
element, i.e., the first element that is strictly greater than element, or to the end if no such element exists.