From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3B0123858D33 for ; Mon, 4 Sep 2023 10:26:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B0123858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693823174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Wvv5HcTa9zRea1JY1Q5oFpAzJHGJHXnGG13DTertUQ=; b=dOb/iEJDDKphc5ZdS4uNKm/so6v0YUSyjxTFRby3A2+llUL8f2uF5RQXUKD6h+TrW4L6g1 4HPZgDQgiNCmdpxYU/JqNP4711ppu+FLG336NmfzKLz1QmQCI5tV3u/uv69wFqUBzMhLTB oTyS2mcx2dIVlrlUYelJ/NS4vXDSt94= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-542-359_gkAdMFyjfOEhbuv1Nw-1; Mon, 04 Sep 2023 06:26:11 -0400 X-MC-Unique: 359_gkAdMFyjfOEhbuv1Nw-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2bcec24e8f8so13768241fa.1 for ; Mon, 04 Sep 2023 03:26:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693823170; x=1694427970; 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=/Wvv5HcTa9zRea1JY1Q5oFpAzJHGJHXnGG13DTertUQ=; b=RAtVUPMMKTRMVjoCxXxzKIpcq75BIDRkLlRTTSz49j44DoVnTJxpbOVlcAdxp/oJZx +zGRzUfejuwaa6jJ62WC5fTZTOiSlSwdV41U9QLx+KZ2Ap1/jW9VuUBJlQ+L2t6M0VBe +l6EijdD+Yu4OE17J4iRd7Ua/fgyiyCcv/fQ43xKvabZasZdFtp8WQhks3l+WwxZ+xSF dG8PntNIb7YWL3yQGDElAbBtHa6yKCElEmAeLwlFHbX5aah2LBEk+5nD4uCmgmUwMekh fHuNzYQMdJ2YV/11zwBo8Fd492iThGK28uCQ4o6d/otAuK+q7RbH4PTtGgftAflQWWtZ LgAw== X-Gm-Message-State: AOJu0Yw30RVsHA3gZ/mJUDDGAxReWpvL08A8eMC5u+10yuwug5yQgcPV 6qqKgE9U2VauSF1XhcE3WfxXlE0Jqd44A7t80wkqnB4V5OTXR3btHhXNn6mbtcUT3Z4KCcU4P68 XQESSxh3+yGSQkQ+hpPAT8Vt7KdaE6qU= X-Received: by 2002:a2e:910b:0:b0:2bc:b9c7:7ba3 with SMTP id m11-20020a2e910b000000b002bcb9c77ba3mr6696425ljg.12.1693823170148; Mon, 04 Sep 2023 03:26:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDuTSf03jwzffUAHorAzTjGulaP7u6DQMnQ8SN9keukxL0edZPxMdxPuk2kDulcnUCRFXLzUYMQoBKN3f/W1A= X-Received: by 2002:a2e:910b:0:b0:2bc:b9c7:7ba3 with SMTP id m11-20020a2e910b000000b002bcb9c77ba3mr6696412ljg.12.1693823169880; Mon, 04 Sep 2023 03:26:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 4 Sep 2023 11:25:58 +0100 Message-ID: Subject: Re: [PING][PATCH v2 2/2] libstdc++: Use new built-in trait __is_signed To: Ken Matsui Cc: gcc-patches , "libstdc++" , Ken Matsui X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 1 Sept 2023 at 14:01, Ken Matsui wrote: > > Ping for the use of __is_signed built-in. > > Sincerely, > Ken Matsui > > > On Wed, Jul 12, 2023 at 6:45=E2=80=AFPM Ken Matsui = wrote: > > > > This patch lets libstdc++ use new built-in trait __is_signed. OK for trunk after the built-in is approved for the compiler. > > > > libstdc++-v3/ChangeLog: > > > > * include/std/type_traits (is_signed): Use __is_signed built-in= trait. > > (is_signed_v): Likewise. > > > > Signed-off-by: Ken Matsui > > --- > > libstdc++-v3/include/std/type_traits | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/includ= e/std/type_traits > > index 0e7a9c9c7f3..23ab5a4b1e5 100644 > > --- a/libstdc++-v3/include/std/type_traits > > +++ b/libstdc++-v3/include/std/type_traits > > @@ -865,6 +865,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > : public __bool_constant<__is_abstract(_Tp)> > > { }; > > > > + /// is_signed > > +#if __has_builtin(__is_signed) > > + template > > + struct is_signed > > + : public __bool_constant<__is_signed(_Tp)> > > + { }; > > +#else > > /// @cond undocumented > > template > bool =3D is_arithmetic<_Tp>::value> > > @@ -877,11 +884,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > { }; > > /// @endcond > > > > - /// is_signed > > template > > struct is_signed > > : public __is_signed_helper<_Tp>::type > > { }; > > +#endif > > > > /// is_unsigned > > template > > @@ -3240,8 +3247,14 @@ template > > template > > inline constexpr bool is_final_v =3D __is_final(_Tp); > > > > +#if __has_builtin(__is_signed) > > +template > > + inline constexpr bool is_signed_v =3D __is_signed(_Tp); > > +#else > > template > > inline constexpr bool is_signed_v =3D is_signed<_Tp>::value; > > +#endif > > + > > template > > inline constexpr bool is_unsigned_v =3D is_unsigned<_Tp>::value; > > > > -- > > 2.41.0 > > >