mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-28 23:04:18 +08:00
Fall back is_integral to std::is_integral in c++11
This commit is contained in:
parent
7073430946
commit
5937c4ae32
@ -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; };
|
||||
|
Loading…
x
Reference in New Issue
Block a user