aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-01-20 16:55:07 +0100
committerAdrian Kummerlaender2015-01-20 16:55:07 +0100
commitb5fc92b5377e3effe4410348f4199316b88fba7f (patch)
tree62e52de144b612b81540e47ba4047c2a9f8c6b16 /src
parent78df97907e9e5758b03fb11f556f24ebb12a740c (diff)
downloadTypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar.gz
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar.bz2
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar.lz
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar.xz
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.tar.zst
TypeAsValue-b5fc92b5377e3effe4410348f4199316b88fba7f.zip
Added basic boolean logic operations
Diffstat (limited to 'src')
-rw-r--r--src/operation/logic.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/operation/logic.h b/src/operation/logic.h
new file mode 100644
index 0000000..23393b2
--- /dev/null
+++ b/src/operation/logic.h
@@ -0,0 +1,28 @@
+#ifndef TYPEASVALUE_SRC_OPERATION_LOGIC_H_
+#define TYPEASVALUE_SRC_OPERATION_LOGIC_H_
+
+#include "type.h"
+
+namespace tav {
+
+template <
+ typename X,
+ typename Y
+>
+using And = Boolean<X::value && Y::value>;
+
+template <
+ typename X,
+ typename Y
+>
+using Or = Boolean<X::value || Y::value>;
+
+template <
+ typename X,
+ typename Y
+>
+using Xor = Boolean<X::value ^ Y::value>;
+
+}
+
+#endif // TYPEASVALUE_SRC_OPERATION_LOGIC_H_