valueList::Till(struct)::type - HaxyM/crap GitHub Wiki

crap :: valuList <Type, Values...> :: template Till <N> :: type

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


template <class Type, Type ... Values> template <std :: size_t N>
struct valueList <Type, Values...> :: Till
{
 /*...*/
 template <template <Type...> class Container = valueListForType <Type> :: template type>
 using type = Container</*Elements form 0 till N*/>;
 /*..*/
};

Member type of valueList :: Till. Value source for subcollection created by valueList :: Till (see valueList :: Till). Passes into Collection subcollection of Values... since beggining till N-th element (not including N-th element - that is first N elements).

Template parameters

Usage example

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

#include <crap/algorithm.d/issortedfortype.h>

#include <iostream>

int main()
{
 using wholeCollection = crap :: valueList<unsigned int, 0u, 2u, 2u, 42u, 4u, 5u, 6u, 7u>;
 using test1 = typename wholeCollection :: template Till <5u> :: template type<>;
 using test2 = typename wholeCollection :: template Till <5u> :: template type<crap :: isSortedForType <unsigned int> :: template type>;
 crap :: printer :: print(std :: cout, ", ", test1{});
 std :: cout << "\n" << std :: boolalpha << test2 :: value << std :: endl;
 return 0;
}

Possible output

0, 1, 2, 42, 4,

false

See also

⚠️ **GitHub.com Fallback** ⚠️