summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2016-03-16 21:32:07 +0100
committerDaniel Wilhelm <daniel@wili.li>2016-03-16 21:32:07 +0100
commitce3574cf7ff2ee68608b4d001f5a6dd1e36b2252 (patch)
tree576b1741351e1cd34f0fcce49f98df9c17e10912 /zen/basic_math.h
parent7.6 (diff)
downloadFreeFileSync-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.h6
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);
bgstack15