libcaf  0.15.3
Public Types | Public Member Functions | Static Public Attributes | Related Functions | List of all members
caf::variant< Ts > Class Template Reference

A variant represents always a valid value of one of the types Ts.... More...

#include <variant.hpp>

Public Types

using types = detail::type_list< Ts... >
 

Public Member Functions

variantoperator= (const variant &other)
 
variantoperator= (variant &&other)
 
template<class U >
 variant (U &&arg)
 
template<class U >
variantoperator= (U &&arg)
 
 variant (const variant &other)
 
 variant (variant &&other)
 

Static Public Attributes

static constexpr int max_type_id = sizeof...(Ts) - 1
 

Related Functions

(Note that these are not member functions.)

template<class T , class... Us>
T & get (variant< Us... > &value)
 
template<class T , class... Us>
const T & get (const variant< Us... > &value)
 
template<class T , class... Us>
T * get (variant< Us... > *value)
 
template<class T , class... Us>
const T * get (const variant< Us... > *value)
 
template<class Visitor , class... Ts>
Visitor::result_type apply_visitor (Visitor &visitor, const variant< Ts... > &data)
 
template<class Visitor , class... Ts>
Visitor::result_type apply_visitor (Visitor &visitor, variant< Ts... > &data)
 
template<class... Ts>
bool operator== (const variant< Ts... > &x, const variant< Ts... > &y)
 
template<class T , class... Ts>
bool operator== (const T &x, const variant< Ts... > &y)
 
template<class T , class... Ts>
bool operator== (const variant< Ts... > &x, const T &y)
 
template<class Inspector , class... Ts>
Inspector::result_type inspect (Inspector &f, variant_reader< variant< Ts... >> &x)
 
template<class Inspector , class... Ts>
std::enable_if< Inspector::reads_state, typename Inspector::result_type >::type inspect (Inspector &f, variant< Ts... > &x)
 
template<class Inspector , class... Ts>
Inspector::result_type inspect (Inspector &f, variant_writer< variant< Ts... >> &x)
 
template<class Inspector , class... Ts>
std::enable_if< Inspector::writes_state, typename Inspector::result_type >::type inspect (Inspector &f, variant< Ts... > &x)
 

Detailed Description

template<class... Ts>
class caf::variant< Ts >

A variant represents always a valid value of one of the types Ts....

Friends And Related Function Documentation

template<class Visitor , class... Ts>
Visitor::result_type apply_visitor ( Visitor &  visitor,
const variant< Ts... > &  data 
)
related
template<class Visitor , class... Ts>
Visitor::result_type apply_visitor ( Visitor &  visitor,
variant< Ts... > &  data 
)
related
template<class T , class... Us>
T & get ( variant< Us... > &  value)
related
template<class T , class... Us>
const T & get ( const variant< Us... > &  value)
related
template<class T , class... Us>
T * get ( variant< Us... > *  value)
related
template<class T , class... Us>
const T * get ( const variant< Us... > *  value)
related
template<class Inspector , class... Ts>
Inspector::result_type inspect ( Inspector &  f,
variant_reader< variant< Ts... >> &  x 
)
related
template<class Inspector , class... Ts>
std::enable_if< Inspector::reads_state, typename Inspector::result_type >::type inspect ( Inspector &  f,
variant< Ts... > &  x 
)
related
template<class Inspector , class... Ts>
Inspector::result_type inspect ( Inspector &  f,
variant_writer< variant< Ts... >> &  x 
)
related
template<class Inspector , class... Ts>
std::enable_if< Inspector::writes_state, typename Inspector::result_type >::type inspect ( Inspector &  f,
variant< Ts... > &  x 
)
related
template<class... Ts>
bool operator== ( const variant< Ts... > &  x,
const variant< Ts... > &  y 
)
related
template<class T , class... Ts>
bool operator== ( const T &  x,
const variant< Ts... > &  y 
)
related
template<class T , class... Ts>
bool operator== ( const variant< Ts... > &  x,
const T &  y 
)
related

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