forked from icaven/glm
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
I'm getting compilation errors when compiling with Clang using C++11 or C++14. With GCC and C++11/14 everything compiles fine. I'm compiling on Ubuntu 15.10.
Adding std::
in front of the asinh
, acosh
and atanh
on the lines which give the errors seems to fix this.
I assume the #if GLM_HAS_CXX11_STL
isn't working correctly here?
// asinh
# if GLM_HAS_CXX11_STL
this seems to be removed // by the preprocessor, even if I compile with C++11 or C++14
using std::asinh;
# else
template <typename genType>
GLM_FUNC_QUALIFIER genType asinh(genType const & x)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'asinh' only accept floating-point input");
return (x < static_cast<genType>(0) ? static_cast<genType>(-1) : (x > static_cast<genType>(0) ? static_cast<genType>(1) : static_cast<genType>(0))) * log(std::abs(x) + sqrt(static_cast<genType>(1) + x * x));
}
# endif
template <typename T, precision P, template <typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<T, P> asinh(vecType<T, P> const & v)
{
return detail::functor1<T, T, P, vecType>::call(asinh, v); // <- error here, if I don't change `asinh` -> `std::asinh`
}
Full error log:
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:181:51: error: address of overloaded function 'asinh' does not match required type 'float (float)'
return detail::functor1<T, T, P, vecType>::call(asinh, v);
^~~~~
Release/swig_glm_wrap.cxx:109070:17: note: in instantiation of function template specialization 'glm::asinh<float, glm::precision::highp, tvec2>' requested here
result = glm::asinh((glm::tvec2< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:170:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' against 'float'
inline genType asinh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:179:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' against 'float'
inline vecType<T, P> asinh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:58:38: note: passing argument to parameter 'Func' here
inline static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:181:51: error: address of overloaded function 'asinh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(asinh, v);
^~~~~
Release/swig_glm_wrap.cxx:109097:17: note: in instantiation of function template specialization 'glm::asinh<float, glm::precision::highp,
tvec3>' requested here
result = glm::asinh((glm::tvec3< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:170:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType asinh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:179:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> asinh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:67:38: note: passing argument to parameter 'Func' here
inline static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:181:51: error: address of overloaded function 'asinh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(asinh, v);
^~~~~
Release/swig_glm_wrap.cxx:109124:17: note: in instantiation of function template specialization 'glm::asinh<float, glm::precision::highp,
tvec4>' requested here
result = glm::asinh((glm::tvec4< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:170:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType asinh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:179:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> asinh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:76:38: note: passing argument to parameter 'Func' here
inline static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:202:51: error: address of overloaded function 'acosh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(acosh, v);
^~~~~
Release/swig_glm_wrap.cxx:109241:17: note: in instantiation of function template specialization 'glm::acosh<float, glm::precision::highp,
tvec2>' requested here
result = glm::acosh((glm::tvec2< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:189:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType acosh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:200:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> acosh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:58:38: note: passing argument to parameter 'Func' here
inline static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:202:51: error: address of overloaded function 'acosh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(acosh, v);
^~~~~
Release/swig_glm_wrap.cxx:109268:17: note: in instantiation of function template specialization 'glm::acosh<float, glm::precision::highp,
tvec3>' requested here
result = glm::acosh((glm::tvec3< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:189:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType acosh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:200:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> acosh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:67:38: note: passing argument to parameter 'Func' here
inline static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:202:51: error: address of overloaded function 'acosh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(acosh, v);
^~~~~
Release/swig_glm_wrap.cxx:109295:17: note: in instantiation of function template specialization 'glm::acosh<float, glm::precision::highp,
tvec4>' requested here
result = glm::acosh((glm::tvec4< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:189:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType acosh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:200:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> acosh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:76:38: note: passing argument to parameter 'Func' here
inline static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:223:51: error: address of overloaded function 'atanh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(atanh, v);
^~~~~
Release/swig_glm_wrap.cxx:109412:17: note: in instantiation of function template specialization 'glm::atanh<float, glm::precision::highp,
tvec2>' requested here
result = glm::atanh((glm::tvec2< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:210:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType atanh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:221:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> atanh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:58:38: note: passing argument to parameter 'Func' here
inline static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:223:51: error: address of overloaded function 'atanh' does not match required type 'float
(float)'
return detail::functor1<T, T, P, vecType>::call(atanh, v);
^~~~~
Release/swig_glm_wrap.cxx:109439:17: note: in instantiation of function template specialization 'glm::atanh<float, glm::precision::highp,
tvec3>' requested here
result = glm::atanh((glm::tvec3< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:210:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType atanh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:221:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> atanh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:67:38: note: passing argument to parameter 'Func' here
inline static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
^
In file included from Release/swig_glm_wrap.cxx:2810:
In file included from ../thirdparty/glm/glm.hpp:110:
In file included from ../thirdparty/glm/trigonometric.hpp:35:
In file included from ../thirdparty/glm/detail/func_trigonometric.hpp:206:
../thirdparty/glm/detail/func_trigonometric.inl:223:51: error: address of overloaded function 'atanh' does not match required type 'float (float)'
return detail::functor1<T, T, P, vecType>::call(atanh, v);
^~~~~
Release/swig_glm_wrap.cxx:109466:17: note: in instantiation of function template specialization 'glm::atanh<float, glm::precision::highp,
tvec4>' requested here
result = glm::atanh((glm::tvec4< float,glm::highp > const &)*arg1);
^
../thirdparty/glm/detail/func_trigonometric.inl:210:18: note: candidate template ignored: could not match 'const type-parameter-0-0 &' ag
ainst 'float'
inline genType atanh(genType const & x)
^
../thirdparty/glm/detail/func_trigonometric.inl:221:23: note: candidate template ignored: could not match '<type-parameter-0-0, P>' again
st 'float'
inline vecType<T, P> atanh(vecType<T, P> const & v)
^
../thirdparty/glm/detail/_vectorize.hpp:76:38: note: passing argument to parameter 'Func' here
inline static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
^
9 errors generated.