From 6f07577bf045c7316886ef6cd9a8ee881d1c5749 Mon Sep 17 00:00:00 2001 From: rexy712 Date: Sat, 11 Jun 2022 08:49:04 -0700 Subject: [PATCH] Fix abs placement in utility --- include/rexy/utility.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rexy/utility.hpp b/include/rexy/utility.hpp index 95a8d36..3e227ab 100644 --- a/include/rexy/utility.hpp +++ b/include/rexy/utility.hpp @@ -86,6 +86,10 @@ namespace rexy{ { return cmp(l, r) ? l : r; } + template + constexpr T abs(const T& val){ + return val > 0 ? val : -val; + } #ifdef __cpp_lib_is_constant_evaluated template @@ -145,10 +149,6 @@ namespace rexy{ ld[i] = rd[i]; } } - template - constexpr T abs(const T& val){ - return val > 0 ? val : -val; - } } #endif //__cpp_lib_is_constant_evaluated