diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-02-13 17:14:26 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-02-13 17:14:26 +0100 |
commit | 5937c4ae32feec178d56282694f06ed16cfe7352 (patch) | |
tree | 0a7b47ddadaa6059f85f7742fd9bf65e3b813295 /Eigen/src/Core/util/Meta.h | |
parent | 707343094637b112d49089372a0a8e0a06b0b34c (diff) |
Fall back is_integral to std::is_integral in c++11
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-x | Eigen/src/Core/util/Meta.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 11c089020..90eda6e70 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -97,6 +97,9 @@ template<> struct is_arithmetic<unsigned int> { enum { value = true }; }; template<> struct is_arithmetic<signed long> { enum { value = true }; }; template<> struct is_arithmetic<unsigned long> { enum { value = true }; }; +#if EIGEN_HAS_CXX11 +using std::is_integral; +#else template<typename T> struct is_integral { enum { value = false }; }; template<> struct is_integral<bool> { enum { value = true }; }; template<> struct is_integral<char> { enum { value = true }; }; @@ -108,8 +111,8 @@ template<> struct is_integral<signed int> { enum { value = true }; } template<> struct is_integral<unsigned int> { enum { value = true }; }; template<> struct is_integral<signed long> { enum { value = true }; }; template<> struct is_integral<unsigned long> { enum { value = true }; }; -template<> struct is_integral<signed long long int> { enum { value = true }; }; -template<> struct is_integral<unsigned long long int> { enum { value = true }; }; +#endif + template <typename T> struct add_const { typedef const T type; }; template <typename T> struct add_const<T&> { typedef T& type; }; |