version 0.4.1
Ikarus::traits::Index< T, Tuple > Struct Template Reference

Type trait to get the index of a type in a tuple. More...

Detailed Description

template<class T, class Tuple>
struct Ikarus::traits::Index< T, Tuple >

Usage:

using foo_t = std::tuple<int, double, float>;
static_assert(Index<int, foo_t>::value == 0);
static_assert(Index<double, foo_t>::value == 1);
static_assert(Index<float, foo_t>::value == 2);
Type trait to get the index of a type in a tuple.
Definition: traits.hh:221

If the type is not found, the returned index is the size of the tuple.

Template Parameters
TType to find in the tuple.
TupleTuple type.

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