![]() |
MySQL 9.6.0
Source Code Documentation
|
Helper CRTP base class to define Ordered Set traits classes, which are optionally Bounded and/or Metric (cf Is_bounded_set_traits/Is_metric_set_traits). More...
#include <ordered_set_traits_interface.h>
Public Types | |
| using | Element_t = Element_tp |
| using | Difference_t = Difference_tp |
| using | Less_t = detail::Less< Self_tp, Element_tp > |
Static Public Member Functions | |
| static constexpr bool | in_range (const Element_t &element) |
| static constexpr std::strong_ordering | cmp (const Element_t &left, const Element_t &right) |
| static constexpr bool | lt (const Element_t &left, const Element_t &right) |
| static constexpr bool | le (const Element_t &left, const Element_t &right) |
| static constexpr bool | gt (const Element_t &left, const Element_t &right) |
| static constexpr bool | ge (const Element_t &left, const Element_t &right) |
| static constexpr Difference_t | sub (const Element_t &left, const Element_t &right) |
| static constexpr Difference_t | add (const Difference_proxy_t &left, const Difference_proxy_t &right) |
| static constexpr Element_t | add (const Element_t &left, const Difference_proxy_t &right) |
| static constexpr Element_t | add (const Difference_proxy_t &left, const Element_t &right) |
Private Types | |
| using | Self_t = Self_tp |
| using | This_t = Ordered_set_traits_interface< Self_t, Element_tp, Difference_tp > |
| using | Difference_proxy_t = std::conditional_t< std::same_as< Difference_tp, void >, int, Difference_tp > |
Helper CRTP base class to define Ordered Set traits classes, which are optionally Bounded and/or Metric (cf Is_bounded_set_traits/Is_metric_set_traits).
The subclass is required to define the static member function lt, and this class provides the static member functions gt, le, ge, and the member type Less_t, defined in terms of lt.
If the user defines min and max_exclusive, this provides in_range, making the class satisfy Is_bounded_set_traits.
If the template parameter Difference_tp is given, this class also provides add and sub, defined in terms of + and -, making the class satisfy Is_metric_set_traits.
| Self_tp | The subclass that defines lt. |
| Element_tp | The element type. |
| Difference_tp | The difference type. This may be omitted, in which case this becomes a non-metric Set traits class. |
|
private |
| using mysql::sets::Ordered_set_traits_interface< Self_tp, Element_tp, Difference_tp >::Difference_t = Difference_tp |
| using mysql::sets::Ordered_set_traits_interface< Self_tp, Element_tp, Difference_tp >::Element_t = Element_tp |
| using mysql::sets::Ordered_set_traits_interface< Self_tp, Element_tp, Difference_tp >::Less_t = detail::Less<Self_tp, Element_tp> |
|
private |
|
private |
|
inlinestaticconstexpr |
We use nodiscard instead of nodiscard because nodiscard works when the return type is void.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |