-
Notifications
You must be signed in to change notification settings - Fork 2
valueList::At(struct)
Igor Zarzycki edited this page Jan 23, 2022
·
4 revisions
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. IfN
is larger than or equal tosize
(see valueList :: size) compilation errorIndex out of range.
will appear.
-
value
- value stored at passed possition (seeN
in 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