summaryrefslogtreecommitdiff
path: root/zen/basic_math.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2017-01-08 18:21:23 +0100
committerDaniel Wilhelm <shieldwed@outlook.com>2017-01-08 18:21:23 +0100
commitfe660cdff59aa3a939479ed60172e5c0803552b2 (patch)
tree045cf295b79de10f75ed6362c5836db25c9fc63a /zen/basic_math.h
parent8.6 (diff)
downloadFreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.gz
FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.bz2
FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.zip
8.7
Diffstat (limited to 'zen/basic_math.h')
-rw-r--r--zen/basic_math.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/basic_math.h b/zen/basic_math.h
index e9e17466..eed23477 100644
--- a/zen/basic_math.h
+++ b/zen/basic_math.h
@@ -18,7 +18,7 @@
namespace numeric
{
template <class T> T abs(T value);
-template <class T> T dist(T a, T b);
+template <class T> auto dist(T a, T b);
template <class T> int sign(T value); //returns one of {-1, 0, 1}
template <class T> T min(T a, T b, T c);
template <class T> T max(T a, T b, T c);
@@ -90,7 +90,7 @@ T abs(T value)
}
template <class T> inline
-T dist(T a, T b)
+auto dist(T a, T b) //return type might be different than T, e.g. std::chrono::duration instead of std::chrono::time_point
{
return a > b ? a - b : b - a;
}
bgstack15