MySQL 9.6.0
Source Code Documentation
mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp > Struct Template Reference

Set traits for integral types. More...

#include <int_set_traits.h>

Inheritance diagram for mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >:
[legend]

Public Types

using Base_t = Ordered_set_traits_interface< Int_set_traits< Element_tp, min_tp, max_exclusive_tp >, Element_tp, std::make_unsigned_t< Element_tp > >
 
using Element_t = Base_t::Element_t
 
using Difference_t = Base_t::Difference_t
 
- Public Types inherited from mysql::sets::Ordered_set_traits_interface< Int_set_traits< Element_tp, std::numeric_limits< Element_tp >::min(), std::numeric_limits< Element_tp >::max() >, Element_tp, std::make_unsigned_t< Element_tp > >
using Element_t = Element_tp
 
using Difference_t = std::make_unsigned_t< Element_tp >
 
using Less_t = detail::Less< Int_set_traits< Element_tp, std::numeric_limits< Element_tp >::min(), std::numeric_limits< Element_tp >::max() >, Element_tp >
 

Static Public Member Functions

static constexpr Element_t min ()
 Return the minimum allowed value. More...
 
static constexpr Element_t max_exclusive ()
 
static constexpr bool lt_impl (const Element_t &left, const Element_t &right)
 
static constexpr std::strong_ordering cmp_impl (const Element_t &left, const Element_t &right)
 
static constexpr Element_t next (const Element_t &element)
 
static constexpr Element_t prev (const Element_t &element)
 
- Static Public Member Functions inherited from mysql::sets::Ordered_set_traits_interface< Int_set_traits< Element_tp, std::numeric_limits< Element_tp >::min(), std::numeric_limits< Element_tp >::max() >, Element_tp, std::make_unsigned_t< Element_tp > >
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)
 

Detailed Description

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
struct mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >

Set traits for integral types.

Template Parameters
Element_tpThe integral type.
min_tpThe minimum value. Default is the minimum value for the type (negative for signed types, 0 for unsigned types).
max_exclusive_tpThe maximum value. Default is the maximum value for the type.
Note
This reserves std::numeric_limits<Element_tp>::max() for exclusive endpoints, so that value cannot be represented in the set.

Member Typedef Documentation

◆ Base_t

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
using mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::Base_t = Ordered_set_traits_interface< Int_set_traits<Element_tp, min_tp, max_exclusive_tp>, Element_tp, std::make_unsigned_t<Element_tp> >

◆ Difference_t

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
using mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::Difference_t = Base_t::Difference_t

◆ Element_t

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
using mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::Element_t = Base_t::Element_t

Member Function Documentation

◆ cmp_impl()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr std::strong_ordering mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::cmp_impl ( const Element_t left,
const Element_t right 
)
inlinestaticconstexpr
Returns
true if left < right.

◆ lt_impl()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr bool mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::lt_impl ( const Element_t left,
const Element_t right 
)
inlinestaticconstexpr
Returns
true if left < right.

◆ max_exclusive()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr Element_t mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::max_exclusive ( )
inlinestaticconstexpr
Returns
The maximum allowed value for exclusive endpoints.
Note
The set can store values that are strictly smaller than this number.

◆ min()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr Element_t mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::min ( )
inlinestaticconstexpr

Return the minimum allowed value.

◆ next()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr Element_t mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::next ( const Element_t element)
inlinestaticconstexpr
Returns
element + 1.

◆ prev()

template<std::integral Element_tp, Element_tp min_tp = std::numeric_limits<Element_tp>::min(), Element_tp max_exclusive_tp = std::numeric_limits<Element_tp>::max()>
static constexpr Element_t mysql::sets::Int_set_traits< Element_tp, min_tp, max_exclusive_tp >::prev ( const Element_t element)
inlinestaticconstexpr
Returns
element - 1.

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