From dd504e4fcbf73750097024dce397754dc5883386 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 8 Feb 2015 19:10:59 +0100 Subject: Added `GreaterThan` and `LowerThan` comparators --- src/operation/math.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/operation/math.h b/src/operation/math.h index 28a6832..d855893 100644 --- a/src/operation/math.h +++ b/src/operation/math.h @@ -42,6 +42,9 @@ using Divide = std::integral_constant< X::value / Y::value >; +template +using Square = Multiply; + template < typename X, typename Y @@ -60,8 +63,17 @@ using Even = EqualValue< template using Odd = Not>; -template -using Square = Multiply; +template < + typename X, + typename Y +> +using GreaterThan = Boolean<(X::value > Y::value)>; + +template < + typename X, + typename Y +> +using LowerThan = Boolean<(X::value < Y::value)>; } -- cgit v1.2.3