aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/basic.h
blob: 1e05a5002bb406020105e0cb182399a3b588baf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_
#define TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_

namespace tav {

template <typename Cons>
struct Length {
	typedef Add<
		Size<1>,
		typename Length<Tail<Cons>
	>::type> type;
};

template <>
struct Length<void> {
	typedef Size<0> type;
};

}

#endif  // TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_