This class can be used to retrieve the type of the elements of a pack type. More...
#include <array.hpp>
Public Attributes | |
typedef | type |
This is the same type as type_::typeX assuming that X is the index_ . |
This class can be used to retrieve the type of the elements of a pack type.
This is useful if the index of the element is computed as the result of a compile time expression.
typedef pack<int, constant<int, 5>, std::string> Pack; Pack p(1, 0, "hello"); get_type<1, Pack>::type& ref = p.i1; std::cout << ref << std::endl;
The output would be:
5