summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/basic_math.h
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip
Merge branch '11.7' into 'master'11.7
add upstream 11.7 See merge request opensource-tracking/FreeFileSync!31
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r--zen/basic_math.h22
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))
{
bgstack15