From 2c81be72eef5363736cf1892646c74a3311ee4c1 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sun, 22 May 2022 17:03:17 -0400 Subject: add upstream 11.21 --- zen/basic_math.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'zen/basic_math.h') diff --git a/zen/basic_math.h b/zen/basic_math.h index 944a0f53..c8a06b78 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -8,7 +8,6 @@ #define BASIC_MATH_H_3472639843265675 #include -#include #include #include #include "type_traits.h" @@ -152,10 +151,10 @@ template inline auto intDivRound(N num, D den) { using namespace zen; - static_assert(IsIntegerV&& IsIntegerV); - static_assert(IsSignedIntV == IsSignedIntV); //until further + static_assert(isInteger&& isInteger); + static_assert(isSignedInt == isSignedInt); //until further assert(den != 0); - if constexpr (IsSignedIntV) + if constexpr (isSignedInt) { if ((num < 0) != (den < 0)) return (num - den / 2) / den; @@ -168,10 +167,10 @@ template inline auto intDivCeil(N num, D den) { using namespace zen; - static_assert(IsIntegerV&& IsIntegerV); - static_assert(IsSignedIntV == IsSignedIntV); //until further + static_assert(isInteger&& isInteger); + static_assert(isSignedInt == isSignedInt); //until further assert(den != 0); - if constexpr (IsSignedIntV) + if constexpr (isSignedInt) { if ((num < 0) != (den < 0)) return num / den; @@ -187,10 +186,10 @@ template inline auto intDivFloor(N num, D den) { using namespace zen; - static_assert(IsIntegerV&& IsIntegerV); - static_assert(IsSignedIntV == IsSignedIntV); //until further + static_assert(isInteger&& isInteger); + static_assert(isSignedInt == isSignedInt); //until further assert(den != 0); - if constexpr (IsSignedIntV) + if constexpr (isSignedInt) { if ((num < 0) != (den < 0)) { -- cgit