Template Class Variant

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public boost::variant< T... >

Class Documentation

template<typename ...T>
class Variant : public boost::variant<T...>

LVR2 variant type. Based on boost::variant with some extra functions.

Template Parameters:

T

Public Types

using types = std::tuple<T...>
template<std::size_t N>
using type_of_index = typename std::tuple_element<N, types>::type

Public Functions

std::string typeName() const
int type() const
template<typename U>
U get() const
template<typename U>
U &get()
template<typename U>
inline constexpr bool is_type() const

Public Static Functions

template<typename U>
static inline constexpr std::size_t index_of_type()
static inline constexpr std::size_t num_types()

Friends

inline friend std::ostream &operator<<(std::ostream &os, const Variant<T...> &v)
template<class T1, class Tuple>
struct TupleIndex
template<class T1, class ...Types>
struct TupleIndex<T1, std::tuple<T1, Types...>>

Public Static Attributes

static constexpr std::size_t value = 0
template<class T1, class U, class ...Types>
struct TupleIndex<T1, std::tuple<U, Types...>>

Public Static Attributes

static constexpr std::size_t value = 1 + TupleIndex<T1, std::tuple<Types...>>::value
struct TypeNameVisitor : public boost::static_visitor<std::string>

Public Functions

template<typename U>
inline std::string operator()(const U &type) const