MySQL 8.3.0
Source Code Documentation
stdx Namespace Reference

Namespaces

namespace  base
 
namespace  detail
 
namespace  filesystem
 
namespace  impl
 
namespace  io
 
namespace  ranges
 
namespace  this_process
 

Classes

struct  __is_scoped_enum_helper
 
struct  __is_scoped_enum_helper< T, true >
 
class  expected
 
class  ExpectedImpl
 
class  ExpectedImpl< void, E >
 
class  ExpectedImplBase
 
class  flags
 a type-safe flags type. More...
 
struct  indirectly_readable_traits
 
struct  indirectly_readable_traits< const T >
 
struct  indirectly_readable_traits< T *, std::enable_if_t< std::is_object_v< T > > >
 
struct  indirectly_readable_traits< T, std::enable_if_t< impl::has_element_type< T >::value > >
 
struct  indirectly_readable_traits< T, std::enable_if_t< impl::has_value_type< T >::value > >
 
struct  indirectly_readable_traits< T, std::enable_if_t< std::is_array_v< T > > >
 
struct  is_expected_impl
 
struct  is_expected_impl< expected< T, E > >
 
struct  is_flags
 
struct  is_flags< classic_protocol::message::client::impl::BinlogDump::Flags >
 
struct  is_flags< classic_protocol::message::client::impl::BinlogDumpGtid::Flags >
 
struct  is_flags< StmtClassifier >
 
struct  is_flags< TlsVerifyOpts >
 
struct  is_scoped_enum
 
struct  remove_cvref
 
class  span
 
struct  type_identity
 
struct  unexpect_t
 
class  unexpected
 

Typedefs

template<class T >
using is_expected = is_expected_impl< std::decay_t< T > >
 
template<class T >
using iter_value_t = typename indirectly_readable_traits< stdx::remove_cvref_t< T > >::value_type
 
template<class T >
using iter_reference_t = typename impl::iter_reference< stdx::remove_cvref_t< T > >::reference
 
template<class T >
using remove_cvref_t = typename remove_cvref< T >::type
 
template<class T >
using type_identity_t = typename type_identity< T >::type
 

Enumerations

enum class  endian { little = __ORDER_LITTLE_ENDIAN__ , big = __ORDER_BIG_ENDIAN__ , native = __BYTE_ORDER__ }
 

Functions

template<class IntegerType >
constexpr std::enable_if_t< std::is_integral< IntegerType >::value, IntegerType > byteswap (IntegerType t) noexcept
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, T > rotl (T x, int s) noexcept
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, T > rotr (T x, int s) noexcept
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > popcount (T v) noexcept
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > countl_zero (T x) noexcept
 consecutive 0-bits starting from MSB. More...
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > countr_zero (T x) noexcept
 consecutive 0-bits starting from LSB (right). More...
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > countr_one (T x) noexcept
 consecutive 1-bits starting from LSB (right). More...
 
template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > countl_one (T x) noexcept
 consecutive 1-bits starting from LSB (right). More...
 
template<typename E >
constexpr auto make_unexpected (E &&e) -> unexpected< std::decay_t< E > >
 
template<class E >
 unexpected (E) -> unexpected< E >
 
template<class Exp , class Func >
constexpr auto expected_transform_impl (Exp &&exp, Func &&func)
 
template<class E1 , class E2 >
bool operator== (const unexpected< E1 > &a, const unexpected< E2 > &b)
 
template<class E1 , class E2 >
bool operator!= (const unexpected< E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class T2 , class E2 >
bool operator== (const expected< T1, E1 > &a, const expected< T2, E2 > &b)
 
template<class E1 , class E2 >
bool operator== (const expected< void, E1 > &a, const expected< void, E2 > &b)
 
template<class T1 , class E1 , class T2 , class E2 >
bool operator!= (const expected< T1, E1 > &a, const expected< T2, E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool operator== (const expected< T1, E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool operator== (const unexpected< E2 > &a, const expected< T1, E1 > &b)
 
template<class T1 , class E1 , class E2 >
bool operator!= (const expected< T1, E1 > &a, const unexpected< E2 > &b)
 
template<class T1 , class E1 , class E2 >
bool operator!= (const unexpected< E2 > &a, const expected< T1, E1 > &b)
 
template<class T , class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, T >::value &&impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > operator<< (std::ostream &os, const stdx::expected< T, E > &res)
 write stdx::expected<T, E> to std::ostream. More...
 
template<class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > operator<< (std::ostream &os, const stdx::expected< void, E > &res)
 write stdx::expected<void, E> to std::ostream. More...
 
template<class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > operator<< (std::ostream &os, const stdx::unexpected< E > &res)
 write stdx::unexpected<E> to std::ostream. More...
 
template<class Container >
 span (Container &) -> span< typename Container::value_type >
 
template<class Container >
 span (Container const &) -> span< const typename Container::value_type >
 
template<class T , std::size_t N>
span< const std::byte, detail::span_size< T, N >::size > as_bytes (span< T, N > spn) noexcept
 get a view to underlying bytes of a span 'spn'. More...
 
template<class T , std::size_t N, std::enable_if_t<!std::is_const_v< T >, int > = 0>
span< std::byte, detail::span_size< T, N >::size > as_writable_bytes (span< T, N > spn) noexcept
 get a writable view to underlying bytes of a span 'spn'. More...
 

Variables

constexpr unexpect_t unexpect {}
 
template<class E >
constexpr bool is_flags_v = is_flags<E>::value
 
constexpr std::size_t dynamic_extent
 
template<class E >
constexpr bool is_scoped_enum_v = is_scoped_enum<E>::value
 

Typedef Documentation

◆ is_expected

template<class T >
using stdx::is_expected = typedef is_expected_impl<std::decay_t<T> >

◆ iter_reference_t

template<class T >
using stdx::iter_reference_t = typedef typename impl::iter_reference<stdx::remove_cvref_t<T> >::reference

◆ iter_value_t

template<class T >
using stdx::iter_value_t = typedef typename indirectly_readable_traits<stdx::remove_cvref_t<T> >::value_type

◆ remove_cvref_t

template<class T >
using stdx::remove_cvref_t = typedef typename remove_cvref<T>::type

◆ type_identity_t

template<class T >
using stdx::type_identity_t = typedef typename type_identity<T>::type

Enumeration Type Documentation

◆ endian

enum class stdx::endian
strong
Enumerator
little 
big 
native 

Function Documentation

◆ as_bytes()

template<class T , std::size_t N>
span< const std::byte, detail::span_size< T, N >::size > stdx::as_bytes ( span< T, N >  spn)
noexcept

get a view to underlying bytes of a span 'spn'.

◆ as_writable_bytes()

template<class T , std::size_t N, std::enable_if_t<!std::is_const_v< T >, int > = 0>
span< std::byte, detail::span_size< T, N >::size > stdx::as_writable_bytes ( span< T, N >  spn)
noexcept

get a writable view to underlying bytes of a span 'spn'.

◆ byteswap()

template<class IntegerType >
constexpr std::enable_if_t< std::is_integral< IntegerType >::value, IntegerType > stdx::byteswap ( IntegerType  t)
constexprnoexcept

◆ countl_one()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > stdx::countl_one ( x)
constexprnoexcept

consecutive 1-bits starting from LSB (right).

◆ countl_zero()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > stdx::countl_zero ( x)
inlineconstexprnoexcept

consecutive 0-bits starting from MSB.

0b0000'0000 = 8 0b0000'0001 = 7 0b0000'1110 = 4

◆ countr_one()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > stdx::countr_one ( x)
constexprnoexcept

consecutive 1-bits starting from LSB (right).

◆ countr_zero()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > stdx::countr_zero ( x)
constexprnoexcept

consecutive 0-bits starting from LSB (right).

◆ expected_transform_impl()

template<class Exp , class Func >
constexpr auto stdx::expected_transform_impl ( Exp &&  exp,
Func &&  func 
)
constexpr

◆ make_unexpected()

template<typename E >
constexpr auto stdx::make_unexpected ( E &&  e) -> unexpected<std::decay_t<E>>
constexpr

◆ operator!=() [1/4]

template<class T1 , class E1 , class T2 , class E2 >
bool stdx::operator!= ( const expected< T1, E1 > &  a,
const expected< T2, E2 > &  b 
)
inline

◆ operator!=() [2/4]

template<class T1 , class E1 , class E2 >
bool stdx::operator!= ( const expected< T1, E1 > &  a,
const unexpected< E2 > &  b 
)
inline

◆ operator!=() [3/4]

template<class E1 , class E2 >
bool stdx::operator!= ( const unexpected< E1 > &  a,
const unexpected< E2 > &  b 
)
inline

◆ operator!=() [4/4]

template<class T1 , class E1 , class E2 >
bool stdx::operator!= ( const unexpected< E2 > &  a,
const expected< T1, E1 > &  b 
)

◆ operator<<() [1/3]

template<class T , class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, T >::value && impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > stdx::operator<< ( std::ostream &  os,
const stdx::expected< T, E > &  res 
)
inline

write stdx::expected<T, E> to std::ostream.

T and E must be non-void.

only takes part in overload-resolution if T and E support 'os << v'

◆ operator<<() [2/3]

template<class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > stdx::operator<< ( std::ostream &  os,
const stdx::expected< void, E > &  res 
)
inline

write stdx::expected<void, E> to std::ostream.

only takes part in overload-resolution if E supports 'os << v'

◆ operator<<() [3/3]

template<class E >
std::enable_if_t< impl::is_to_stream_writable< std::ostream, E >::value, std::ostream & > stdx::operator<< ( std::ostream &  os,
const stdx::unexpected< E > &  res 
)
inline

write stdx::unexpected<E> to std::ostream.

only takes part in overload-resolution if E supports 'os << v'

◆ operator==() [1/5]

template<class T1 , class E1 , class T2 , class E2 >
bool stdx::operator== ( const expected< T1, E1 > &  a,
const expected< T2, E2 > &  b 
)
inline

◆ operator==() [2/5]

template<class T1 , class E1 , class E2 >
bool stdx::operator== ( const expected< T1, E1 > &  a,
const unexpected< E2 > &  b 
)
inline

◆ operator==() [3/5]

template<class E1 , class E2 >
bool stdx::operator== ( const expected< void, E1 > &  a,
const expected< void, E2 > &  b 
)
inline

◆ operator==() [4/5]

template<class E1 , class E2 >
bool stdx::operator== ( const unexpected< E1 > &  a,
const unexpected< E2 > &  b 
)
inline

◆ operator==() [5/5]

template<class T1 , class E1 , class E2 >
bool stdx::operator== ( const unexpected< E2 > &  a,
const expected< T1, E1 > &  b 
)
inline

◆ popcount()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, int > stdx::popcount ( v)
constexprnoexcept

◆ rotl()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, T > stdx::rotl ( x,
int  s 
)
constexprnoexcept

◆ rotr()

template<class T >
constexpr std::enable_if_t< std::is_unsigned< T >::value, T > stdx::rotr ( x,
int  s 
)
constexprnoexcept

◆ span() [1/2]

template<class Container >
stdx::span ( Container &  ) -> span< typename Container::value_type >

◆ span() [2/2]

template<class Container >
stdx::span ( Container const &  ) -> span< const typename Container::value_type >

◆ unexpected()

template<class E >
stdx::unexpected ( ) -> unexpected< E >

Variable Documentation

◆ dynamic_extent

constexpr std::size_t stdx::dynamic_extent
inlineconstexpr
Initial value:
=
std::numeric_limits<std::size_t>::max()

◆ is_flags_v

template<class E >
constexpr bool stdx::is_flags_v = is_flags<E>::value
inlineconstexpr

◆ is_scoped_enum_v

template<class E >
constexpr bool stdx::is_scoped_enum_v = is_scoped_enum<E>::value
inlineconstexpr

◆ unexpect

constexpr unexpect_t stdx::unexpect {}
inlineconstexpr