valueList::At(struct) - HaxyM/crap GitHub Wiki
Defined in "crap/utility.d/valuelist.h".
Defined in "crap/utility".
template <class Type, Type ... Values> struct valueList
{
/*...*/
template <std :: size_t N> struct At;
/*...*/
};Member type of valueList. Gives access to element from collection present at possition N. Passing N larger than or equal to size (see valueList :: size) will cause compilation error Index out of range..
-
N- possition of element to access. IfNis larger than or equal tosize(see valueList :: size) compilation errorIndex out of range.will appear.
-
value- value stored at passed possition (seeNin Template parameters section).
#include <crap/utility.d/valuelist.h>
#include <iostream>
int main()
{
using test = crap :: valueList<unsigned int, 0u, 1u, 2u, 42u, 4u, 5u, 6u, 7u>;
using test2 = typename test :: template At<3u>;
std :: cout << test2 :: value << std :: endl;
return 0;
}42