This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR libstdc++/85951 for make_signed/make_unsigned for character types


On 31/05/18 13:17 +0100, Jonathan Wakely wrote:
Because the wide character types are neither signed integer types nor
unsigned integer types they need to be transformed to an integral type
of the correct size and the lowest rank (which is not necessarily the
underlying type). Reuse the helpers for enumeration types to select the
correct integer.

The refactoring of __make_unsigned_selector and __make_signed_selector
slightly reduces the number of template instantiations and so reduces
memory usage.

A follow-up patch to fix some comment typos, committed to trunk.



commit 70dcac99fea2e03ef010f77bbbf62e9a2a23ab97
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 5 08:35:05 2018 +0100

            * include/std/type_traits: Fix comment typos.

diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 4397c484f20..01972d125c7 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -1641,7 +1641,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
   // wchar_t, char16_t and char32_t are integral types but are neither
-  // signed integer types not unsigned integer types, so must be
+  // signed integer types nor unsigned integer types, so must be
   // transformed to the unsigned integer type with the smallest rank.
   // Use the partial specialization for enumeration types to do that.
 #if defined(_GLIBCXX_USE_WCHAR_T)
@@ -1758,7 +1758,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     };
 
   // wchar_t, char16_t and char32_t are integral types but are neither
-  // signed integer types not unsigned integer types, so must be
+  // signed integer types nor unsigned integer types, so must be
   // transformed to the signed integer type with the smallest rank.
   // Use the partial specialization for enumeration types to do that.
 #if defined(_GLIBCXX_USE_WCHAR_T)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]