diff options
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/limits | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/type_traits | 36 |
2 files changed, 20 insertions, 18 deletions
diff --git a/libstdc++-v3/include/std/limits b/libstdc++-v3/include/std/limits index f2c2072..79aff3d 100644 --- a/libstdc++-v3/include/std/limits +++ b/libstdc++-v3/include/std/limits @@ -1478,6 +1478,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; #define __INT_N(TYPE, BITSIZE, EXT, UEXT) \ + __extension__ \ template<> \ struct numeric_limits<TYPE> \ { \ @@ -1546,6 +1547,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = round_toward_zero; \ }; \ \ + __extension__ \ template<> \ struct numeric_limits<unsigned TYPE> \ { \ diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 8d9c639..15ec83a 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -347,48 +347,52 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_integral_helper<unsigned long long> : public true_type { }; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" - // Conditionalizing on __STRICT_ANSI__ here will break any port that // uses one of these types for size_t. #if defined(__GLIBCXX_TYPE_INT_N_0) + __extension__ template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0> : public true_type { }; + __extension__ template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0> : public true_type { }; #endif #if defined(__GLIBCXX_TYPE_INT_N_1) + __extension__ template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1> : public true_type { }; + __extension__ template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1> : public true_type { }; #endif #if defined(__GLIBCXX_TYPE_INT_N_2) + __extension__ template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2> : public true_type { }; + __extension__ template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2> : public true_type { }; #endif #if defined(__GLIBCXX_TYPE_INT_N_3) + __extension__ template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3> : public true_type { }; + __extension__ template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3> : public true_type { }; #endif -#pragma GCC diagnostic pop /// @endcond /// is_integral @@ -621,10 +625,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp, typename... _Types> using __is_one_of = __or_<is_same<_Tp, _Types>...>; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" - // Check if a type is one of the signed integer types. + __extension__ template<typename _Tp> using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, signed char, signed short, signed int, signed long, @@ -644,6 +646,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >; // Check if a type is one of the unsigned integer types. + __extension__ template<typename _Tp> using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, unsigned char, unsigned short, unsigned int, unsigned long, @@ -661,7 +664,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION , unsigned __GLIBCXX_TYPE_INT_N_3 #endif >; -#pragma GCC diagnostic pop // Check if a type is one of the signed or unsigned integer types. template<typename _Tp> @@ -1725,32 +1727,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __make_unsigned<long long> { typedef unsigned long long __type; }; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" - #if defined(__GLIBCXX_TYPE_INT_N_0) + __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0> { typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_1) + __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1> { typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_2) + __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2> { typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_3) + __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3> { typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; }; #endif -#pragma GCC diagnostic pop - // Select between integral and enum: not possible to be both. template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, @@ -1886,32 +1887,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __make_signed<unsigned long long> { typedef signed long long __type; }; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpedantic" - #if defined(__GLIBCXX_TYPE_INT_N_0) + __extension__ template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0> { typedef __GLIBCXX_TYPE_INT_N_0 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_1) + __extension__ template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1> { typedef __GLIBCXX_TYPE_INT_N_1 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_2) + __extension__ template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2> { typedef __GLIBCXX_TYPE_INT_N_2 __type; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_3) + __extension__ template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3> { typedef __GLIBCXX_TYPE_INT_N_3 __type; }; #endif -#pragma GCC diagnostic pop - // Select between integral and enum: not possible to be both. template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, |