From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x931.google.com (mail-ua1-x931.google.com [IPv6:2607:f8b0:4864:20::931]) by sourceware.org (Postfix) with ESMTPS id D3B883858C31 for ; Mon, 10 Jul 2023 05:35:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D3B883858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-79702eee5a8so775641241.1 for ; Sun, 09 Jul 2023 22:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1688967304; x=1691559304; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DMiqQ+6L1PUttUOLCPvqEqFratVAVWnsL6byN/WZ8Qw=; b=EF1zDQGvwNNKyQl6wpUGAfIhftSn618TqfmKJYopli3rGoj64KlqIMuJcDNhIEfqj5 +uYXO0sLIA/tirjFuKF7k40iodI0kgrCqeBsKtfBqsSjUw1PUealQUyahPKDAj3CICp1 BTF/QBu5hDdARLghpHvrA8Zl2XYx7IVyP0fAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688967304; x=1691559304; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DMiqQ+6L1PUttUOLCPvqEqFratVAVWnsL6byN/WZ8Qw=; b=XkxMN9+E9Z5iN8LO92BjKZi09Pl+wouIlgUVPzAhrDgnl8ahd3F0RQV9T4EPo1tkYN ScdU2daoAEdZdpK30cMcGMwRb9eOQXvMrRAHexJMrltjLW7fhMWYjBia+jddoLstYkur f/++sCOL0M1y9H8N+wRxa1nhUH6A1uRGW7n0OjfpQHkZyQUKiSoDdrI0udIESDQGIyA0 Q1DW7apr2w0Y7dtbWRF23o/aE39GHwyRp/DHqgwaSLGyPRxuk6/E/qsbGEabGKBrLEKM PqGXT2MlS6Y0d+tQQxfc1/nXsbe/djDDHwnPGBpV7AHR/E0OievHcMIQxvO1CFtNUWcC Etkw== X-Gm-Message-State: ABy/qLazhfQWOPuhuTgpvDIgz+BT6qTB4Y8bAYAnYewqC6mMzTotP48h ow/0HO/3O48jJIUYs01IpVlcf50XvwBbT/HZBvCS7v5ZCnhvFOG4 X-Google-Smtp-Source: APBJJlFQdYFT/QHLFCMzVFZqyu2j5VYOPrqKC3ogzxYVDyXp5SQOipss5y/JUkdLpFkJz0QSrL9sLvDKj5WsQYm7kvE= X-Received: by 2002:a67:fa17:0:b0:444:c9b4:25bc with SMTP id i23-20020a67fa17000000b00444c9b425bcmr4978146vsq.17.1688967304431; Sun, 09 Jul 2023 22:35:04 -0700 (PDT) MIME-Version: 1.0 References: <20230710052310.48116-1-kmatsui@gcc.gnu.org> <20230710052310.48116-2-kmatsui@gcc.gnu.org> In-Reply-To: From: Ken Matsui Date: Sun, 9 Jul 2023 22:34:48 -0700 Message-ID: Subject: Re: [PATCH 2/2] libstdc++: use new built-in trait __is_pointer To: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= Cc: Ken Matsui , gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Oops! Thank you for pointing that out! Sincerely, Ken Matsui On Sun, Jul 9, 2023 at 10:33=E2=80=AFPM Daniel Kr=C3=BCgler wrote: > > Am Mo., 10. Juli 2023 um 07:24 Uhr schrieb Ken Matsui via Libstdc++ > : > > > > This patch lets libstdc++ use new built-in trait __is_pointer. > > > > libstdc++-v3/ChangeLog: > > > > * include/std/type_traits (is_pointer): Use __is_pointer > > built-in trait. > > (is_pointer_v): Likewise. > > > > Signed-off-by: Ken Matsui > > --- > > libstdc++-v3/include/std/type_traits | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/includ= e/std/type_traits > > index 0e7a9c9c7f3..d83db98403b 100644 > > --- a/libstdc++-v3/include/std/type_traits > > +++ b/libstdc++-v3/include/std/type_traits > > @@ -515,6 +515,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > struct is_array<_Tp[]> > > : public true_type { }; > > > > + /// is_pointer > > +#if __has_builtin(__is_pointer) > > + template > > + struct is_pointer > > + : public __bool_constant<__is_pointer(_Tp)> > > + { }; > > +#else > > template > > struct __is_pointer_helper > > : public false_type { }; > > @@ -523,11 +530,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > struct __is_pointer_helper<_Tp*> > > : public true_type { }; > > > > - /// is_pointer > > template > > struct is_pointer > > : public __is_pointer_helper<__remove_cv_t<_Tp>>::type > > { }; > > +#endif > > > > /// is_lvalue_reference > > template > > -- > > 2.41.0 > > Shouldn't this adjust is_pointer_v as well? > > Thanks, > > - Daniel