tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches

etl::variant class template More...

Classes

struct  variant< Ts >
 

Functions

template<typename F, typename... Vs>
constexpr auto visit (F &&f, Vs &&... vs)
 Applies the visitor vis (Callable that can be called with any combination of types from variants) to the variants vars.
 
template<typename F, typename... Vs>
constexpr auto visit_with_index (F &&f, Vs &&... vs)
 Applies the visitor vis (Callable that can be called with any combination of types from variants) to the variants vars.
 

Detailed Description

etl::variant class template

Function Documentation

◆ visit()

template<typename F, typename... Vs>
auto visit ( F && f,
Vs &&... vs )
related

Applies the visitor vis (Callable that can be called with any combination of types from variants) to the variants vars.

Every type in etl::remove_reference_t<Variants>... may be a (possibly const-qualified) specialization of etl::variant.

◆ visit_with_index()

template<typename F, typename... Vs>
auto visit_with_index ( F && f,
Vs &&... vs )
related

Applies the visitor vis (Callable that can be called with any combination of types from variants) to the variants vars.

Every type in etl::remove_reference_t<Variants>... may be a (possibly const-qualified) specialization of etl::variant.

  • Access index as v.index
  • Access value as v.value()