aboutsummaryrefslogtreecommitdiff
path: root/src/type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/type.h')
-rw-r--r--src/type.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/type.h b/src/type.h
new file mode 100644
index 0000000..1149520
--- /dev/null
+++ b/src/type.h
@@ -0,0 +1,25 @@
+#ifndef TYPEASVALUE_SRC_TYPE_H_
+#define TYPEASVALUE_SRC_TYPE_H_
+
+#include <type_traits>
+
+namespace tav {
+
+template <int Value>
+using Int = typename std::integral_constant<int, Value>::type;
+
+template <bool Value>
+using Boolean = typename std::integral_constant<bool, Value>::type;
+
+template <
+ typename X,
+ typename Y
+>
+using equal_type = typename std::integral_constant<
+ bool,
+ std::is_same<typename X::value_type, typename Y::value_type>::value
+>::type;
+
+}
+
+#endif // TYPEASVALUE_SRC_TYPE_H_