diff options
author | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
commit | ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252 (patch) | |
tree | 576b1741351e1cd34f0fcce49f98df9c17e10912 /zen/basic_math.h | |
parent | 7.6 (diff) | |
download | FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.gz FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.bz2 FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.zip |
7.7
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r-- | zen/basic_math.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h index 8b745caf..a15d811a 100644 --- a/zen/basic_math.h +++ b/zen/basic_math.h @@ -38,7 +38,7 @@ template <class T> T clampCpy(const T& val, const T& minVal, const T& maxVal); template <class T, class InputIterator> //precondition: range must be sorted! -auto nearMatch(const T& val, InputIterator first, InputIterator last) -> typename std::iterator_traits<InputIterator>::value_type; +auto nearMatch(const T& val, InputIterator first, InputIterator last); template <class T> bool isNull(T value); @@ -195,10 +195,10 @@ std::pair<InputIterator, InputIterator> minMaxElement(InputIterator first, Input */ template <class T, class InputIterator> inline -auto nearMatch(const T& val, InputIterator first, InputIterator last) -> typename std::iterator_traits<InputIterator>::value_type +auto nearMatch(const T& val, InputIterator first, InputIterator last) { if (first == last) - return 0; + return static_cast<decltype(*first)>(0); assert(std::is_sorted(first, last)); InputIterator it = std::lower_bound(first, last, val); |