diff options
author | Adrian Kummerlaender | 2015-01-20 16:55:07 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-01-20 16:55:07 +0100 |
commit | b5fc92b5377e3effe4410348f4199316b88fba7f (patch) | |
tree | 62e52de144b612b81540e47ba4047c2a9f8c6b16 /src | |
parent | 78df97907e9e5758b03fb11f556f24ebb12a740c (diff) | |
download | TypeAsValue-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.h | 28 |
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_ |