Fix the is_enum type trait for char16/32_t (C++11)
Add the char16/32_t types to the is_integral check with true for the type traits to pass the qglobal test for the is_enum functionality. Otherwise, those types will be detected as enums due to the internal test. These types are integral after all. Change-Id: I89ef6b6b4be348d8ef57b0d19ccea55b435e9b14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
c82121fd7f
commit
2025d02cf7
@ -246,6 +246,10 @@ template<> struct is_integral<unsigned long long> : true_type { };
|
||||
template <class T> struct is_integral<const T> : is_integral<T> { };
|
||||
template <class T> struct is_integral<volatile T> : is_integral<T> { };
|
||||
template <class T> struct is_integral<const volatile T> : is_integral<T> { };
|
||||
#if defined (Q_COMPILER_UNICODE_STRINGS)
|
||||
template<> struct is_integral<char16_t> : true_type { };
|
||||
template<> struct is_integral<char32_t> : true_type { };
|
||||
#endif
|
||||
|
||||
// is_floating_point is false except for the built-in floating-point types.
|
||||
// A cv-qualified type is integral if and only if the underlying type is.
|
||||
|
Loading…
Reference in New Issue
Block a user