MySQL 8.3.0
Source Code Documentation
stdx::base::storage_t< T, E > Union Template Reference

#include <expected.h>

Public Types

using value_type = T
 
using error_type = E
 

Public Member Functions

 storage_t ()
 
 ~storage_t ()
 
template<bool B = std::is_default_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void construct_value ()
 
template<bool B = std::is_copy_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void construct_value (value_type const &e)
 
template<bool B = std::is_move_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void construct_value (value_type &&e)
 
template<class... Args, std::enable_if_t< std::is_constructible_v< T, Args &&... >, void * > = nullptr>
void construct_value (std::in_place_t, Args &&... args)
 
template<class U , class... Args, std::enable_if_t< std::is_constructible_v< T, std::initializer_list< U > &, Args &&... >, void * > = nullptr>
void construct_value (std::in_place_t, std::initializer_list< U > il, Args &&... args)
 
void destruct_value ()
 
void construct_error (error_type const &e)
 
void construct_error (error_type &&e)
 
template<class... Args, std::enable_if_t< std::is_constructible_v< E, Args &&... > > * = nullptr>
void construct_error (std::in_place_t, Args &&... args)
 
void destruct_error ()
 
constexpr const value_typevalue () const &
 
constexpr const value_type && value () const &&
 
value_typevalue () &
 
constexpr value_type && value () &&
 
const value_typevalue_ptr () const
 
value_typevalue_ptr ()
 
constexpr const error_typeerror () const &
 
constexpr const error_type && error () const &&
 
constexpr error_typeerror () &
 
constexpr error_type && error () &&
 

Private Attributes

value_type value_
 
error_type error_
 

Member Typedef Documentation

◆ error_type

template<class T , class E >
using stdx::base::storage_t< T, E >::error_type = E

◆ value_type

template<class T , class E >
using stdx::base::storage_t< T, E >::value_type = T

Constructor & Destructor Documentation

◆ storage_t()

template<class T , class E >
stdx::base::storage_t< T, E >::storage_t ( )
inline

◆ ~storage_t()

template<class T , class E >
stdx::base::storage_t< T, E >::~storage_t ( )
inline

Member Function Documentation

◆ construct_error() [1/3]

template<class T , class E >
void stdx::base::storage_t< T, E >::construct_error ( error_type &&  e)
inline

◆ construct_error() [2/3]

template<class T , class E >
void stdx::base::storage_t< T, E >::construct_error ( error_type const &  e)
inline

◆ construct_error() [3/3]

template<class T , class E >
template<class... Args, std::enable_if_t< std::is_constructible_v< E, Args &&... > > * = nullptr>
void stdx::base::storage_t< T, E >::construct_error ( std::in_place_t  ,
Args &&...  args 
)
inline

◆ construct_value() [1/5]

template<class T , class E >
template<bool B = std::is_default_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void stdx::base::storage_t< T, E >::construct_value ( )
inline

◆ construct_value() [2/5]

template<class T , class E >
template<class... Args, std::enable_if_t< std::is_constructible_v< T, Args &&... >, void * > = nullptr>
void stdx::base::storage_t< T, E >::construct_value ( std::in_place_t  ,
Args &&...  args 
)
inline

◆ construct_value() [3/5]

template<class T , class E >
template<class U , class... Args, std::enable_if_t< std::is_constructible_v< T, std::initializer_list< U > &, Args &&... >, void * > = nullptr>
void stdx::base::storage_t< T, E >::construct_value ( std::in_place_t  ,
std::initializer_list< U il,
Args &&...  args 
)
inline

◆ construct_value() [4/5]

template<class T , class E >
template<bool B = std::is_move_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void stdx::base::storage_t< T, E >::construct_value ( value_type &&  e)
inline

◆ construct_value() [5/5]

template<class T , class E >
template<bool B = std::is_copy_constructible<T>::value, std::enable_if_t< B > * = nullptr>
void stdx::base::storage_t< T, E >::construct_value ( value_type const &  e)
inline

◆ destruct_error()

template<class T , class E >
void stdx::base::storage_t< T, E >::destruct_error ( )
inline

◆ destruct_value()

template<class T , class E >
void stdx::base::storage_t< T, E >::destruct_value ( )
inline

◆ error() [1/4]

template<class T , class E >
constexpr error_type & stdx::base::storage_t< T, E >::error ( ) &
inlineconstexpr

◆ error() [2/4]

template<class T , class E >
constexpr error_type && stdx::base::storage_t< T, E >::error ( ) &&
inlineconstexpr

◆ error() [3/4]

template<class T , class E >
constexpr const error_type & stdx::base::storage_t< T, E >::error ( ) const &
inlineconstexpr

◆ error() [4/4]

template<class T , class E >
constexpr const error_type && stdx::base::storage_t< T, E >::error ( ) const &&
inlineconstexpr

◆ value() [1/4]

template<class T , class E >
value_type & stdx::base::storage_t< T, E >::value ( ) &
inline

◆ value() [2/4]

template<class T , class E >
constexpr value_type && stdx::base::storage_t< T, E >::value ( ) &&
inlineconstexpr

◆ value() [3/4]

template<class T , class E >
constexpr const value_type & stdx::base::storage_t< T, E >::value ( ) const &
inlineconstexpr

◆ value() [4/4]

template<class T , class E >
constexpr const value_type && stdx::base::storage_t< T, E >::value ( ) const &&
inlineconstexpr

◆ value_ptr() [1/2]

template<class T , class E >
value_type * stdx::base::storage_t< T, E >::value_ptr ( )
inline

◆ value_ptr() [2/2]

template<class T , class E >
const value_type * stdx::base::storage_t< T, E >::value_ptr ( ) const
inline

Member Data Documentation

◆ error_

template<class T , class E >
error_type stdx::base::storage_t< T, E >::error_
private

◆ value_

template<class T , class E >
value_type stdx::base::storage_t< T, E >::value_
private

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