point: remove constexpr from functions relying on cmath

This commit is contained in:
Danny Robson 2015-10-06 15:20:06 +11:00
parent 7753e37dc3
commit f7a1ead518
2 changed files with 7 additions and 7 deletions

View File

@ -45,13 +45,13 @@ namespace util {
// distance operators
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type distance (point<S,T>, point<S,U>);
typename std::common_type<T,U>::type distance (point<S,T>, point<S,U>);
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type distance2 (point<S,T>, point<S,U>);
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type octile (point<S,T>, point<S,U>);
template <typename T, typename U>
typename std::common_type<T,U>::type octile (point<2,T>, point<2,U>);
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type manhattan (point<S,T>, point<S,U>);

View File

@ -48,7 +48,7 @@ namespace util {
//-------------------------------------------------------------------------
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type
typename std::common_type<T,U>::type
distance (point<S,T> a, point<S,U> b)
{
using type_t = typename std::common_type<T,U>::type;
@ -74,9 +74,9 @@ namespace util {
//-------------------------------------------------------------------------
template <size_t S, typename T, typename U>
constexpr typename std::common_type<T,U>::type
octile (point<S,T> a, point<S,U> b)
template <typename T, typename U>
typename std::common_type<T,U>::type
octile (point2<T> a, point2<U> b)
{
using type_t = typename std::common_type<T,U>::type;
static_assert (!std::is_integral<type_t>::value,