From f7a1ead51895fbc7cdf1b81347ad0ca91cc84b16 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 6 Oct 2015 15:20:06 +1100 Subject: [PATCH] point: remove constexpr from functions relying on cmath --- point.hpp | 6 +++--- point.ipp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/point.hpp b/point.hpp index c6e6e165..5b21aba6 100644 --- a/point.hpp +++ b/point.hpp @@ -45,13 +45,13 @@ namespace util { // distance operators template - constexpr typename std::common_type::type distance (point, point); + typename std::common_type::type distance (point, point); template constexpr typename std::common_type::type distance2 (point, point); - template - constexpr typename std::common_type::type octile (point, point); + template + typename std::common_type::type octile (point<2,T>, point<2,U>); template constexpr typename std::common_type::type manhattan (point, point); diff --git a/point.ipp b/point.ipp index e816c9c9..119e150b 100644 --- a/point.ipp +++ b/point.ipp @@ -48,7 +48,7 @@ namespace util { //------------------------------------------------------------------------- template - constexpr typename std::common_type::type + typename std::common_type::type distance (point a, point b) { using type_t = typename std::common_type::type; @@ -74,9 +74,9 @@ namespace util { //------------------------------------------------------------------------- - template - constexpr typename std::common_type::type - octile (point a, point b) + template + typename std::common_type::type + octile (point2 a, point2 b) { using type_t = typename std::common_type::type; static_assert (!std::is_integral::value,