CVB++ 14.0
Cvb::Shims Namespace Reference

Namespace to for standard types that are not available in C++14. More...

Classes

class  bad_optional_access
 Error when accessing not set value. More...
 
class  bad_variant_access
 Error when accessing not set alternative. More...
 
struct  in_place_t
 Disambiguation tags that can be passed to the constructors of optional() to indicate that the contained object should be constructed in-place. More...
 
struct  monostate
 Unit type intended for use as a well-behaved empty alternative in variant. More...
 
struct  nullopt_t
 Indicates optional() type with uninitialized state. More...
 
class  optional
 This class is a replacement for C++17 std::optional. More...
 
class  variant
 This class is a replacement for C++17 std::variant. More...
 
struct  variant_alternative
 Compile-time index access to the type of the alternatives at index I. More...
 
struct  variant_size
 Get the number of alternatives in a variant. More...
 

Typedefs

template<size_t I, class T >
using variant_alternative_t = typename variant_alternative< I, T >::type
 Helper type alias for Shims::variant_alternative.
 

Functions

template<size_t I, class... TS>
variant_alternative_t< I, variant< TS... > > & get (variant< TS... > &var)
 
template<size_t I, class... TS>
variant_alternative_t< I, variant< TS... > > get (variant< TS... > &&var)
 
template<class T , class... TS>
T & get (variant< TS... > &var)
 
template<class T , class... TS>
get (variant< TS... > &&var)
 
template<size_t I, class... TS>
std::add_pointer< variant_alternative_t< I, variant< TS... > > >::type get_if (variant< TS... > *pvar) noexcept
 
template<class T , class... TS>
std::add_pointer< T >::type get_if (variant< TS... > *pvar) noexcept
 class...>(const variant<TS...> &) More...
 

Variables

static constexpr nullopt_t nullopt = {}
 Tag to indicate an #optional not containing a value.
 
static constexpr in_place_t in_place {}
 Tag to indicate an Optional to in-place construct a value.
 
static const constexpr size_t variant_npos = size_t(-1)
 Returned by variant::index() on invalid state.
 

Detailed Description

Namespace to for standard types that are not available in C++14.

Function Documentation

◆ get() [1/4]

variant_alternative_t< I, variant< TS... > > get ( variant< TS... > &&  var)

◆ get() [2/4]

T get ( variant< TS... > &&  var)

◆ get() [3/4]

variant_alternative_t< I, variant< TS... > > & get ( variant< TS... > &  var)

◆ get() [4/4]

T & get ( variant< TS... > &  var)

◆ get_if() [1/2]

std::add_pointer< variant_alternative_t< I, variant< TS... > > >::type get_if ( variant< TS... > *  pvar)
noexcept

◆ get_if() [2/2]

std::add_pointer< T >::type get_if ( variant< TS... > *  pvar)
noexcept

class...>(const variant<TS...> &)

class...>(const variant<TS...> &)