point: remove constexpr from functions relying on cmath
This commit is contained in:
parent
7753e37dc3
commit
f7a1ead518
@ -45,13 +45,13 @@ namespace util {
|
|||||||
|
|
||||||
// distance operators
|
// distance operators
|
||||||
template <size_t S, typename T, typename U>
|
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>
|
template <size_t S, typename T, typename U>
|
||||||
constexpr typename std::common_type<T,U>::type distance2 (point<S,T>, point<S,U>);
|
constexpr typename std::common_type<T,U>::type distance2 (point<S,T>, point<S,U>);
|
||||||
|
|
||||||
template <size_t S, typename T, typename U>
|
template <typename T, typename U>
|
||||||
constexpr typename std::common_type<T,U>::type octile (point<S,T>, point<S,U>);
|
typename std::common_type<T,U>::type octile (point<2,T>, point<2,U>);
|
||||||
|
|
||||||
template <size_t S, typename T, typename U>
|
template <size_t S, typename T, typename U>
|
||||||
constexpr typename std::common_type<T,U>::type manhattan (point<S,T>, point<S,U>);
|
constexpr typename std::common_type<T,U>::type manhattan (point<S,T>, point<S,U>);
|
||||||
|
@ -48,7 +48,7 @@ namespace util {
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
template <size_t S, typename T, typename U>
|
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)
|
distance (point<S,T> a, point<S,U> b)
|
||||||
{
|
{
|
||||||
using type_t = typename std::common_type<T,U>::type;
|
using type_t = typename std::common_type<T,U>::type;
|
||||||
@ -74,9 +74,9 @@ namespace util {
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
template <size_t S, typename T, typename U>
|
template <typename T, typename U>
|
||||||
constexpr typename std::common_type<T,U>::type
|
typename std::common_type<T,U>::type
|
||||||
octile (point<S,T> a, point<S,U> b)
|
octile (point2<T> a, point2<U> b)
|
||||||
{
|
{
|
||||||
using type_t = typename std::common_type<T,U>::type;
|
using type_t = typename std::common_type<T,U>::type;
|
||||||
static_assert (!std::is_integral<type_t>::value,
|
static_assert (!std::is_integral<type_t>::value,
|
||||||
|
Loading…
Reference in New Issue
Block a user