aboutsummaryrefslogtreecommitdiff
path: root/src/list/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list/list.h')
-rw-r--r--src/list/list.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/list/list.h b/src/list/list.h
new file mode 100644
index 0000000..47d0d2f
--- /dev/null
+++ b/src/list/list.h
@@ -0,0 +1,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_