aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/operation/math.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/operation/math.h b/src/operation/math.h
index fd6e031..b06eb35 100644
--- a/src/operation/math.h
+++ b/src/operation/math.h
@@ -41,6 +41,12 @@ using Divide = typename std::integral_constant<
X::value / Y::value
>::type;
+template <typename X>
+using Even = Boolean<(X::value % 2 == 0)>;
+
+template <typename X>
+using Odd = Boolean<!Even<X>::value>;
+
}
#endif // TYPEASVALUE_SRC_OPERATION_MATH_H_