mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 17:33:15 +08:00
that's getting harder and harder to make ICC, GCC and clang all happy: one wants type_name to be static and if it is so then the other one triggers 'unused function' warnings -> a forward declaration seems to do the trick
This commit is contained in:
parent
260a923334
commit
bea4a67c92
@ -377,7 +377,9 @@ template<> struct GetDifferentType<double> { typedef float type; };
|
|||||||
template<typename T> struct GetDifferentType<std::complex<T> >
|
template<typename T> struct GetDifferentType<std::complex<T> >
|
||||||
{ typedef std::complex<typename GetDifferentType<T>::type> type; };
|
{ typedef std::complex<typename GetDifferentType<T>::type> type; };
|
||||||
|
|
||||||
template<typename T> static std::string type_name() { return "other"; }
|
// Forward declaration to avoid ICC warning
|
||||||
|
template<typename T> std::string type_name();
|
||||||
|
template<typename T> std::string type_name() { return "other"; }
|
||||||
template<> std::string type_name<float>() { return "float"; }
|
template<> std::string type_name<float>() { return "float"; }
|
||||||
template<> std::string type_name<double>() { return "double"; }
|
template<> std::string type_name<double>() { return "double"; }
|
||||||
template<> std::string type_name<int>() { return "int"; }
|
template<> std::string type_name<int>() { return "int"; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user