bug #1761: Manually grafted changes in Meta.h

5937c4ae32feec178d56282694f06ed16cfe7352
  Fall back is_integral to std::is_integral in c++11
f0862b062fcb613ee6c60745631d90a43d54a6d4
  Fix internal::is_integral<size_t/ptrdiff_t> with MSVC 2013 and older.
This commit is contained in:
Christoph Hertzberg 2019-10-24 13:29:35 +02:00
parent 1760432f6e
commit cd12bf6317

View File

@ -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<signed long> { enum { value = true }; };
template<> struct is_arithmetic<unsigned 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<typename T> struct is_integral { enum { value = false }; };
template<> struct is_integral<bool> { enum { value = true }; }; template<> struct is_integral<bool> { enum { value = true }; };
template<> struct is_integral<char> { enum { value = true }; }; template<> struct is_integral<char> { enum { value = true }; };
@ -108,6 +111,11 @@ template<> struct is_integral<signed int> { enum { value = true }; };
template<> struct is_integral<unsigned 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<signed long> { enum { value = true }; };
template<> struct is_integral<unsigned long> { enum { value = true }; }; template<> struct is_integral<unsigned long> { enum { value = true }; };
#if EIGEN_COMP_MSVC
template<> struct is_integral<signed __int64> { enum { value = true }; };
template<> struct is_integral<unsigned __int64>{ enum { value = true }; };
#endif
#endif
#if EIGEN_HAS_CXX11 #if EIGEN_HAS_CXX11
using std::make_unsigned; using std::make_unsigned;