blob: d927905ec26d7280ecc0968bf9020d49d7cc35f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_
#define TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_
#include "list/cons.h"
#include "operation/math.h"
namespace tav {
template <
typename Count,
typename Element
>
struct MakeList {
typedef Eval<Cons<
Element,
Eval<MakeList<
Substract<Count, Size<1>>,
Element
>>
>> type;
};
template <typename Element>
struct MakeList<Size<1>, Element> {
typedef Eval<Cons<Element, void>> type;
};
}
#endif // TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_
|