File tree Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
3
namespace tl {
4
- struct null_t {};
4
+
5
+ struct null_t {
6
+ using head = null_t ;
7
+ using tail = null_t ;
8
+ };
5
9
6
10
template <class T , class U >
7
11
struct tl
@@ -10,6 +14,13 @@ struct tl
10
14
using tail = U;
11
15
};
12
16
17
+ template <class TList >
18
+ using head_t = typename TList::head;
19
+
20
+ template <class TList >
21
+ using tail_t = typename TList::tail;
22
+
23
+
13
24
template <class ... Ts> struct make ;
14
25
15
26
template <class T , class ... REST>
@@ -37,24 +48,4 @@ template <class TList, class T>
37
48
using append_t = typename append<TList, T>::type;
38
49
39
50
40
- template <class TList >
41
- struct list_content ;
42
- template <class Head , class Tail >
43
- struct list_content <tl<Head, Tail>> {
44
- using head = Head;
45
- using tail = Tail;
46
- };
47
- template <>
48
- struct list_content <null_t > {
49
- using head = null_t ;
50
- using tail = null_t ;
51
- };
52
-
53
- template <class TList >
54
- using head_t = typename list_content<TList>::head;
55
-
56
- template <class TList >
57
- using tail_t = typename list_content<TList>::tail;
58
-
59
-
60
51
} // namespace tl
You can’t perform that action at this time.
0 commit comments