From bd9f1b2e9d21590288dc58980e991d2b687ce025 Mon Sep 17 00:00:00 2001 From: glisse Date: Sat, 4 Mar 2017 19:36:54 +0000 Subject: Missing includes and const for Euclidean_distance. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2158 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9f2243ec5c2a50b271031b6b8c8148afeb0bc1df --- src/common/include/gudhi/distance_functions.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h index 5891ef0e..7bf97c23 100644 --- a/src/common/include/gudhi/distance_functions.h +++ b/src/common/include/gudhi/distance_functions.h @@ -24,6 +24,8 @@ #define DISTANCE_FUNCTIONS_H_ #include // for std::sqrt +#include // for std::decay +#include // for std::begin, std::end /** @file * @brief Global distance functions @@ -34,7 +36,7 @@ class Euclidean_distance { public: template< typename Point > - auto operator()(const Point& p1, const Point& p2) -> typename std::decay::type { + auto operator()(const Point& p1, const Point& p2) const -> typename std::decay::type { auto it1 = p1.begin(); auto it2 = p2.begin(); typename Point::value_type dist = 0.; -- cgit v1.2.3