Dune::FirstTypeIndex< Tuple, T, start > Struct Template Reference
[Tuple Utilities]

Find the first occurrence of a type in a std::tuple. More...

#include <dune/common/tupleutility.hh>

Inheritance diagram for Dune::FirstTypeIndex< Tuple, T, start >:
Dune::FirstPredicateIndex< Tuple, IsType< T >::template Predicate, start > type

List of all members.


Detailed Description

template<class Tuple, class T, std::size_t start = 0>
struct Dune::FirstTypeIndex< Tuple, T, start >

Find the first occurrence of a type in a std::tuple.

Template Parameters:
Tuple The std::tuple type to search in.
T Type to search for.
start First index to try. This can be adjusted to skip leading std::tuple elements.

This class can search for a particular type in std::tuple. It will check each type in the std::tuple in turn, and set its member constant value to the index of the first occurrence of type was found. If the type was not found, a static_assert is triggered.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 25 Mar 2018 for dune-common by  doxygen 1.6.1