From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by sourceware.org (Postfix) with ESMTPS id B854D3858C5F for ; Tue, 21 Mar 2023 17:02:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B854D3858C5F 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-xe2e.google.com with SMTP id f23so4810349vsv.13 for ; Tue, 21 Mar 2023 10:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1679418165; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tM8UG1yeMtbaaN/iGWin8bSFRYaz5OYVpBwB4hs9UpI=; b=EeLxS31GKR8CaidpEyK/ad9A3j/TvGVj1k5h6oD1f9HyVE6APuVdp9QppQ4TwOIxvs EB4tzU/iYKoNL7V3VRHEEellOVW2vdyuhoAFWHs024lejBbeUE5H341YTSOe90ay2M9E KZTJJDZ61bvR7PjKjQ1ECyPCYFnL6210wt7Do= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679418165; 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=tM8UG1yeMtbaaN/iGWin8bSFRYaz5OYVpBwB4hs9UpI=; b=rOoXx8Kg7M9aKkvO+t+gkNPbBB+gKUSIlXjgEwIjB3Us4uCmJ70X6AOhlKrDcdUm6X d/ssPDfQmffGs8nhQ37wz2iT0G04JcFslJM9zqVlEOQQj59tCAxMNkrxUHE1zTowUpGk Zvmbg9YyEr2dhYTrVEje5oviL+kGHLMuBuNKlDOxJ6LTK8FZkeSNjOVxVMT+oZAt4UDd 9OZaLZRHlb5xK48KmoB9W2BTIPOVdnM0jC4p1llOyLJI2BbzkZFXznWYlkhZmyVUg+0z m//N018RDR1hnJ0VbvwsU7iz8rpwfPGtYDTbxc696xo6WaC2OdO5LIupzuHIj9V3SNSF iqwA== X-Gm-Message-State: AO0yUKX5ZgafvCl/N/83HuJcVTD+/GytQXJLuSbtpXNL3wEAEJYVOgJx IvgPRQ/Swat0lc1Th50tQL3k8fnOrptLFndyxFw4Pw== X-Google-Smtp-Source: AK7set+/gj1RjQiPuxygfrXl568cvQ/5k4q+aj6UEQaT7SsXbo1nAY0Fu1AMg1OQ3LIMAk07G99X1o2BWjzSLAQRaCw= X-Received: by 2002:a67:e153:0:b0:425:cf3c:de6 with SMTP id o19-20020a67e153000000b00425cf3c0de6mr1936838vsl.6.1679418165088; Tue, 21 Mar 2023 10:02:45 -0700 (PDT) MIME-Version: 1.0 References: <20230321163949.1950-1-kmatsui@cs.washington.edu> <20230321163949.1950-2-kmatsui@cs.washington.edu> In-Reply-To: From: Ken Matsui Date: Tue, 21 Mar 2023 10:02:34 -0700 Message-ID: Subject: Re: [PATCH 2/2] libstdc++: use new built-in trait __is_unsigned To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, ppalka@redhat.com Content-Type: multipart/alternative; boundary="00000000000028e77605f76c033e" X-Spam-Status: No, score=-10.0 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 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: --00000000000028e77605f76c033e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I see. Thank you! On Tue, Mar 21, 2023 at 9:44=E2=80=AFAM Jonathan Wakely wrote: > > > On Tue, 21 Mar 2023 at 16:41, Ken Matsui via Libstdc++ < > libstdc++@gcc.gnu.org> wrote: > >> This patch lets libstdc++ use new built-in trait __is_unsigned. >> >> libstdc++-v3/ChangeLog: >> >> * include/std/type_traits (is_unsigned): Use __is_unsigned >> built-in trait. >> > > Please wrap the ChangeLog entry to less than 80 columns (including 8 for > the leading tab). > > > >> --- >> libstdc++-v3/include/std/type_traits | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/libstdc++-v3/include/std/type_traits >> b/libstdc++-v3/include/std/type_traits >> index 2bd607a8b8f..8d5a05cd0a6 100644 >> --- a/libstdc++-v3/include/std/type_traits >> +++ b/libstdc++-v3/include/std/type_traits >> @@ -884,10 +884,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> { }; >> >> /// is_unsigned >> +#if __has_builtin(__is_unsigned) >> + template >> + struct is_unsigned >> + : public __bool_constant<__is_unsigned(_Tp)> >> + { }; >> +#else >> template >> struct is_unsigned >> : public __and_, __not_>>::type >> { }; >> +#endif >> > > Thanks, I expect this trait to make a much bigger difference than > add_const, so I'm very happy to see this one! > > > >> >> /// @cond undocumented >> template >> -- >> 2.40.0 >> >> --00000000000028e77605f76c033e--