PLaSK library
Loading...
Searching...
No Matches
plask::chooseType< nr, types > Struct Template Reference

Choose nr-th type from types list. More...

#include <plask/utils/metaprog.hpp>

Public Types

typedef std::tuple_element< nr, std::tuple< types... > >::type type
 

Detailed Description

template<int nr, typename... types>
struct plask::chooseType< nr, types >

Choose nr-th type from types list.

For example:

chooseType<2, A, B, C, D>::type c; //is equal to: C c;
chooseType<false, A, B>::type a; //is equal to: A a;
chooseType<true, A, B>::type b; //is equal to: B b;

Definition at line 37 of file metaprog.hpp.

Member Typedef Documentation

◆ type

template<int nr, typename... types>
typedef std::tuple_element<nr,std::tuple<types...>>::type plask::chooseType< nr, types >::type

Definition at line 38 of file metaprog.hpp.


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