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