aboutsummaryrefslogtreecommitdiff
path: root/src/list/list.h
blob: 47d0d2f538c141fe29c7f3c8fba3dfbd4d37e745 (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
#ifndef TYPEASVALUE_SRC_LIST_LIST_H_
#define TYPEASVALUE_SRC_LIST_LIST_H_

#include "cons.h"

namespace tav {

template <
	typename    Head,
	typename... Tail
>
struct List {
	typedef Cons<
		Head,
		typename List<Tail...>::type
	> type;
};

template <typename Head>
struct List<Head> {
	typedef Cons<Head, void> type;
};

}

#endif  // TYPEASVALUE_SRC_LIST_LIST_H_