blob: 8eb88bad3fe5cd7b95ae4f79d6b2686fb6c3a0c0 (
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
31
|
#ifndef TYPEASVALUE_SRC_LIST_OPERATION_NTH_H_
#define TYPEASVALUE_SRC_LIST_OPERATION_NTH_H_
#include "operation/math.h"
namespace tav {
template <
typename Index,
typename Cons
>
struct Nth {
typedef typename Nth<
Substract<Index, Size<1>>,
Tail<Cons>
>::type type;
};
template <typename Cons>
struct Nth<Size<0>, Cons> {
typedef Head<Cons> type;
};
template <typename Index>
struct Nth<Index, void> {
typedef void type;
};
}
#endif // TYPEASVALUE_SRC_LIST_OPERATION_NTH_H_
|