CAF  0.17.2
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
caf::default_sum_type_access< T > Struct Template Reference

Allows specializing the sum_type_access trait for any type that simply wraps a variant and exposes it with a get_data() member function. More...

#include <default_sum_type_access.hpp>

Public Types

using types = typename T::types
 
using type0 = typename detail::tl_head< types >::type
 

Static Public Member Functions

template<class U , int Pos>
static bool is (const T &x, sum_type_token< U, Pos > token)
 
template<class U , int Pos>
static U & get (T &x, sum_type_token< U, Pos > token)
 
template<class U , int Pos>
static const U & get (const T &x, sum_type_token< U, Pos > token)
 
template<class U , int Pos>
static U * get_if (T *x, sum_type_token< U, Pos > token)
 
template<class U , int Pos>
static const U * get_if (const T *x, sum_type_token< U, Pos > token)
 
template<class Result , class Visitor , class... Ts>
static Result apply (T &x, Visitor &&visitor, Ts &&... xs)
 
template<class Result , class Visitor , class... Ts>
static Result apply (const T &x, Visitor &&visitor, Ts &&... xs)
 

Static Public Attributes

static constexpr bool specialized = true
 

Detailed Description

template<class T>
struct caf::default_sum_type_access< T >

Allows specializing the sum_type_access trait for any type that simply wraps a variant and exposes it with a get_data() member function.


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