Skip to content

valueList::size

Igor Zarzycki edited this page Jan 23, 2022 · 2 revisions

crap :: valueList <Type, Values...> :: size

Defined in "crap/utility.d/valuelist.h".
Defined in "crap/utility".


template <class Type, Values...> struct valueList
{
 /*...*/
 constexpr const static std :: size_t size = sizeof...(Values);
 /*...*/
};

Member constant of valueList. Stores numer of elements present in collection.

Usage example

#include <crap/utility.d/valuelist.h>

#include <iostream>

int main()
{
 using test = crap :: valueList<unsigned int, 0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u>;
 std :: cout << test :: size << std :: endl;
 return 0;
}

Expected output

8

See also

Clone this wiki locally