From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by sourceware.org (Postfix) with ESMTPS id 9B6073858C30 for ; Mon, 20 Mar 2023 08:03:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B6073858C30 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-xe2c.google.com with SMTP id d2so3472588vso.9 for ; Mon, 20 Mar 2023 01:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1679299412; 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=fuVydsug96Uoxbb6Fv3C2ykQtEMKsY2MePrC5MatxtI=; b=Dfbr+/cVWLzXlMGEJ9v9Sm7lol2ebfBK/N90dQ/3F9Yyr9FpuUTE9Xlidz6ZiQqbkb cjXFEdoucq40tKzPFZV6WQf3O+qeGCvBIRf+UvXPdgBJR+5ZNbmCFImqa0A1MX5z3WVL hbK+udmR4IsNNmzqIMK8hevb58Yltu8o625YA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679299412; 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=fuVydsug96Uoxbb6Fv3C2ykQtEMKsY2MePrC5MatxtI=; b=fxWiBnUNL8vYTj3zjnaHWSCJ/G3vljM+qkNHgpUk/vvY0/6jADKlHRC7PHJmVMI6/q VViYNLPPuuiPRd14VBzGDHehIbah9upcXEvRX5xS0E7fDp7xrd6qZguX8qoEKQbBAehF Gb8Fu04zQIOSIyT7VnqScTjgDiez3oyEPaZAoggSBKU4s6woLOhRoJpcAsBCtMo7aGrs 7ilpX7stcaqb8r24TwQSsl1aA0HgXxNti4av2pOiIyj3V4j78DdaGGCQgwZiQP49lzca csPfLFHMiEZ3bRndajNewhJ/XXWb6+tayYr5+F8i2r5VOE0i0pfUBss1csqHnoX1BOlF d/3g== X-Gm-Message-State: AO0yUKUoMkzXa6o7qW+vLzhs9LORDgWBD2F0WgwqRs1SJ+zh5mQgjluC dhuRJRdNDzEPyEEUHkx4hnEHYDD7Ne0+0jPHztgnDJgNWppm2W5yvHc= X-Google-Smtp-Source: AK7set92qposYz6VvxAlkpuAeSd0BPOrsNqr0r5TUADafuC8gMoVqaS/aSf4+6JE+VWwp4cmu/YD7TdppjP6Hh6uOaY= X-Received: by 2002:a67:e012:0:b0:402:9b84:1be4 with SMTP id c18-20020a67e012000000b004029b841be4mr3388818vsl.6.1679299411869; Mon, 20 Mar 2023 01:03:31 -0700 (PDT) MIME-Version: 1.0 References: <45e80ead7387ef50026922c217a33719bfc66a4a.camel@xry111.site> In-Reply-To: <45e80ead7387ef50026922c217a33719bfc66a4a.camel@xry111.site> From: Ken Matsui Date: Mon, 20 Mar 2023 01:03:21 -0700 Message-ID: Subject: Re: [PATCH] libstdc++: use new built-in trait __is_reference To: Xi Ruoyao Cc: gcc-patches@gcc.gnu.org, Patrick Palka , libstdc++@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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, I assumed those were my email... Thank you for your heads up and your comments! > Bad ChangeLog format. You should have a tab (not 4 or 8 spaces, nor > nothing) to indent the ChangeLog content. Do you mean like the following? ``` libstdc++-v3/ChangeLog: [TAB]* include/std/type_traits (is_reference): Use __is_reference built-in trait. ``` > Is there any benefit to use a builtin, instead of the existing > implementation? I can see no but maybe I'm stupid. My patches are based on the GSoC project "C++: Implement compiler built-in traits for the standard library traits". These built-in traits basically make the compilation faster. https://gcc.gnu.org/wiki/SummerOfCode > The patch fails to apply. It seems because your mail client inserted an > additional newline before "b/". Try to use git-send-email or configure > the mail client properly. Let me try to use git-send-email instead. I stupidly don't understand how to use them, so I was making my patches manually... > If a patch depends on another patch not applied yet, sent them in a > series. Or people are puzzled because when this patch is applied alone, > the code fails to build. Oooh, this one! [PATCH 3/7] - the third patch in a series of seven patches I totally missed that. Thank you! On Mon, Mar 20, 2023 at 12:51=E2=80=AFAM Xi Ruoyao wro= te: > > On Mon, 2023-03-20 at 00:30 -0700, Ken Matsui wrote: > > I see. Thank you! > > Please continue to read. I guess you missed some inline comments from > me... > > > > > On Mon, Mar 20, 2023 at 12:26=E2=80=AFAM Xi Ruoyao = wrote: > > > > > > You need to CC libstdc++@gcc.gnu.org for any patches touching > > > libstdc++. > > > > > > On Sat, 2023-03-18 at 21:21 -0700, Ken Matsui via Gcc-patches wrote: > > > > libstdc++-v3/ChangeLog: > > > > > > > > * include/std/type_traits (is_reference): Use __is_reference > > > > built-in > > > > trait. > > > > > > Bad ChangeLog format. You should have a tab (not 4 or 8 spaces, nor > > > nothing) to indent the ChangeLog content. > > > > > > Is there any benefit to use a builtin, instead of the existing > > > implementation? I can see no but maybe I'm stupid. > > > > > > > --- > > > > diff --git a/libstdc++-v3/include/std/type_traits > > > > b/libstdc++-v3/include/std/type_traits > > > > > > The patch fails to apply. It seems because your mail client > > > inserted an > > > additional newline before "b/". Try to use git-send-email or > > > configure > > > the mail client properly. > > > > > > > index 2bd607a8b8f..18408d8ceb6 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) > > > > + template > > > > + struct is_reference > > > > + : public integral_constant > > > > > > If a patch depends on another patch not applied yet, sent them in a > > > series. Or people are puzzled because when this patch is applied > > > alone, > > > the code fails to build. > > > > > > > + { }; > > > > +#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 > > > > > > -- > > > Xi Ruoyao > > > School of Aerospace Science and Technology, Xidian University > > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University