diff options
author | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
commit | 840e906a4ddbbb32b8a5989e8a0ce10c8c374819 (patch) | |
tree | 6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/basic_math.h | |
parent | Merge branch '11.6' into 'master' (diff) | |
download | FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.gz FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.bz2 FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.zip |
add upstream 11.7
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r-- | zen/basic_math.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h index a4feb83e..944a0f53 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -111,14 +111,14 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input } } } - return { lowest, largest }; + return {lowest, largest}; } template <class InputIterator> inline std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, InputIterator last) { - return minMaxElement(first, last, std::less<typename std::iterator_traits<InputIterator>::value_type>()); + return minMaxElement(first, last, std::less()); } */ @@ -152,10 +152,10 @@ template <class N, class D> inline auto intDivRound(N num, D den) { using namespace zen; - static_assert(IsInteger<N>::value && IsInteger<D>::value); - static_assert(IsSignedInt<N>::value == IsSignedInt<D>::value); //until further + static_assert(IsIntegerV<N>&& IsIntegerV<D>); + static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further assert(den != 0); - if constexpr (IsSignedInt<N>::value) + if constexpr (IsSignedIntV<N>) { if ((num < 0) != (den < 0)) return (num - den / 2) / den; @@ -168,10 +168,10 @@ template <class N, class D> inline auto intDivCeil(N num, D den) { using namespace zen; - static_assert(IsInteger<N>::value && IsInteger<D>::value); - static_assert(IsSignedInt<N>::value == IsSignedInt<D>::value); //until further + static_assert(IsIntegerV<N>&& IsIntegerV<D>); + static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further assert(den != 0); - if constexpr (IsSignedInt<N>::value) + if constexpr (IsSignedIntV<N>) { if ((num < 0) != (den < 0)) return num / den; @@ -187,10 +187,10 @@ template <class N, class D> inline auto intDivFloor(N num, D den) { using namespace zen; - static_assert(IsInteger<N>::value && IsInteger<D>::value); - static_assert(IsSignedInt<N>::value == IsSignedInt<D>::value); //until further + static_assert(IsIntegerV<N>&& IsIntegerV<D>); + static_assert(IsSignedIntV<N> == IsSignedIntV<D>); //until further assert(den != 0); - if constexpr (IsSignedInt<N>::value) + if constexpr (IsSignedIntV<N>) { if ((num < 0) != (den < 0)) { |