public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Ken Matsui <kmatsui@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r14-2474] libstdc++: Use __is_enum built-in trait
Date: Wed, 12 Jul 2023 19:04:47 +0000 (GMT)	[thread overview]
Message-ID: <20230712190447.74B153858D20@sourceware.org> (raw)

https://gcc.gnu.org/g:ef42efe373b012a297e534f7fb5b30e601cc7017

commit r14-2474-gef42efe373b012a297e534f7fb5b30e601cc7017
Author: Ken Matsui <kmatsui@gcc.gnu.org>
Date:   Sun Jul 2 18:12:30 2023 -0700

    libstdc++: Use __is_enum built-in trait
    
    This patch replaces is_enum<T>::value with __is_enum built-in trait in
    the type_traits header.
    
    libstdc++-v3/ChangeLog:
    
            * include/std/type_traits (__make_unsigned_selector): Use
            __is_enum built-in trait.
            (__make_signed_selector): Likewise.
            (__underlying_type_impl): Likewise.
    
    Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
    Reviewed-by: Jonathan Wakely <jwakely@redhat.com>

Diff:
---
 libstdc++-v3/include/std/type_traits | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 0e7a9c9c7f3..9f086992ebc 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -1740,7 +1740,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // Select between integral and enum: not possible to be both.
   template<typename _Tp,
 	   bool _IsInt = is_integral<_Tp>::value,
-	   bool _IsEnum = is_enum<_Tp>::value>
+	   bool _IsEnum = __is_enum(_Tp)>
     class __make_unsigned_selector;
 
   template<typename _Tp>
@@ -1900,7 +1900,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // Select between integral and enum: not possible to be both.
   template<typename _Tp,
 	   bool _IsInt = is_integral<_Tp>::value,
-	   bool _IsEnum = is_enum<_Tp>::value>
+	   bool _IsEnum = __is_enum(_Tp)>
     class __make_signed_selector;
 
   template<typename _Tp>
@@ -2353,7 +2353,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct __common_type_fold<_CTp, _Rp, void>
     { };
 
-  template<typename _Tp, bool = is_enum<_Tp>::value>
+  template<typename _Tp, bool = __is_enum(_Tp)>
     struct __underlying_type_impl
     {
       using type = __underlying_type(_Tp);

                 reply	other threads:[~2023-07-12 19:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230712190447.74B153858D20@sourceware.org \
    --to=kmatsui@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).