From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by sourceware.org (Postfix) with ESMTPS id ABEE13858D20 for ; Mon, 12 Jun 2023 18:13:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABEE13858D20 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-vs1-xe29.google.com with SMTP id ada2fe7eead31-43dd820d2d6so101434137.1 for ; Mon, 12 Jun 2023 11:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1686593635; x=1689185635; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aW7ytL1CQ8heJlJrLH9RM05zLawm/GN2feo6RibyMdo=; b=dF0bAnGUie5ROWFwSbmNGAJGSsx5xYha2vPZ6p7vfIo2kUOHDdOEjCoybtMgJHVIy9 x8zX3NB11FLpxVvlcAkadhJzZVxov2qciMsVj53uu7xBGK/4RmwMeHkhCfSQbrT63aih nmxK5L69411EBOmlsKoW0IF2XRqHLz93jgXp0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686593635; x=1689185635; h=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=aW7ytL1CQ8heJlJrLH9RM05zLawm/GN2feo6RibyMdo=; b=kuhpP9bBcqGnfp/l5q/VXynuYlKK8rEdqxaVEFi9eFEDKAFWSWYqH6sb7jO+jQlS8+ 70BlP1rkUolbRoUzasAW6jvqYpGkDkNf7kjjdhi87jtz5Irz0AIvlIU2/Gaw2MDIySQT RWtiUihcKRSza7VnodP1GFkxOAGTwyTsCzFryaj/XJx0BKZHfD9yEQ1wL99lyd19R4YP wUNyOTJYJxdQkG7xAY4DiozR+BGSsZV/IuxUgz3zb6tlMwX3zxof+kh8OdsLsfPwb6fR ptTAeYccKBwyiY8JxpbVBHVBP5EMW7TedB1zvX++dMFMMjN/8UH/0twU/bvaIf1gPiPI 8ONg== X-Gm-Message-State: AC+VfDx3nFAjKo70GjDP7bG9HJlDY4nTwNVeVqd4SSk8QD+GtIQ3qo8F GfOPk2vkoVobw3eFlCn4sVotTd3qB9Rjm7nCXMNnvg== X-Google-Smtp-Source: ACHHUZ72tZYgkBpeUe7pddnia8vOLeVQREc/3vjZREh/LyREykJApWxYdw+IIDj+sRqO8eyymYlPf5u/wZk+InuF/wk= X-Received: by 2002:a05:6102:c04:b0:43b:4f2e:359 with SMTP id x4-20020a0561020c0400b0043b4f2e0359mr5600667vss.3.1686593634847; Mon, 12 Jun 2023 11:13:54 -0700 (PDT) MIME-Version: 1.0 References: <20230402075314.39853-1-kmatsui@cs.washington.edu> <20230611024657.42846-1-kmatsui@cs.washington.edu> <20230611024657.42846-3-kmatsui@cs.washington.edu> <5c09a61c-9eb0-e858-f4b0-1b338a70d333@gmail.com> In-Reply-To: <5c09a61c-9eb0-e858-f4b0-1b338a70d333@gmail.com> From: Ken Matsui Date: Mon, 12 Jun 2023 11:13:43 -0700 Message-ID: Subject: Re: [PATCH v4 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Content-Type: multipart/alternative; boundary="0000000000007c64e205fdf2aeb5" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,HTML_MESSAGE,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: --0000000000007c64e205fdf2aeb5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, I have fixed them on my side and am waiting for the test results! Thank you! On Mon, Jun 12, 2023 at 11:09 AM Fran=C3=A7ois Dumont wrote: > Same remark for all your alike patches. > > On 11/06/2023 04:43, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_reference to dispatch to new built-in trait > > __is_reference. > > > > libstdc++-v3/ChangeLog: > > > > * include/std/type_traits (is_reference): Use __is_reference > built-in > > trait. > > (is_reference_v): Likewise. > > > > Signed-off-by: Ken Matsui > > --- > > libstdc++-v3/include/std/type_traits | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/libstdc++-v3/include/std/type_traits > b/libstdc++-v3/include/std/type_traits > > index 0e7a9c9c7f3..b2eb4bd3e7f 100644 > > --- a/libstdc++-v3/include/std/type_traits > > +++ b/libstdc++-v3/include/std/type_traits > > @@ -639,6 +639,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > // Composite type categories. > > > > /// is_reference > > +#if __has_builtin(__is_reference) > Here you are checking __has_builtin(__is_reference)... > > + template > > + struct is_reference > > + : public __bool_constant<__is_reference(_Tp)> > > + { }; > > +#else > > template > > struct is_reference > > : public false_type > > @@ -653,6 +659,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > struct is_reference<_Tp&&> > > : public true_type > > { }; > > +#endif > > > > /// is_arithmetic > > template > > @@ -3193,11 +3200,7 @@ template > > template > > inline constexpr bool is_function_v =3D is_function<_Tp>::value; > > template > > - inline constexpr bool is_reference_v =3D false; > > -template > > - inline constexpr bool is_reference_v<_Tp&> =3D true; > > -template > > - inline constexpr bool is_reference_v<_Tp&&> =3D true; > > + inline constexpr bool is_reference_v =3D __is_reference(_Tp); > ...but not here, why ? > > -- Sincerely, Ken Matsui --0000000000007c64e205fdf2aeb5--