mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Add is_integral<> type traits
This commit is contained in:
parent
0ad7c7b1ad
commit
e52d4f8d8d
@ -73,6 +73,18 @@ 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 }; };
|
||||||
|
|
||||||
|
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 }; };
|
||||||
|
template<> struct is_integral<signed char> { enum { value = true }; };
|
||||||
|
template<> struct is_integral<unsigned char> { enum { value = true }; };
|
||||||
|
template<> struct is_integral<signed short> { enum { value = true }; };
|
||||||
|
template<> struct is_integral<unsigned short> { enum { value = true }; };
|
||||||
|
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 <typename T> struct add_const { typedef const T type; };
|
template <typename T> struct add_const { typedef const T type; };
|
||||||
template <typename T> struct add_const<T&> { typedef T& type; };
|
template <typename T> struct add_const<T&> { typedef T& type; };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user