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 CCEC83857438 for ; Fri, 1 Sep 2023 13:00:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCEC83857438 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-44d3666c6cfso914022137.3 for ; Fri, 01 Sep 2023 06:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1693573202; x=1694178002; darn=gcc.gnu.org; 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=tbIOQk45FLXBFC8XdYCf+vyWpv3fSqe0eUXpbAwrUjQ=; b=UJdAhABhg/hy6F70g34QE5nLx7rKAqor0REVnQd0+e5aO1frDtiE8S89N+IEbgHcF/ qFDdvYwn0gnyNDV1/V1MQ+enRtlA8nxOuJvm2udGnVh/CTpB/ypo4ZXWwME2B9CJAeZC eOg5Ugk2Evyga9qCRBOjY8X4Qk/27yMiICuN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693573202; x=1694178002; 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=tbIOQk45FLXBFC8XdYCf+vyWpv3fSqe0eUXpbAwrUjQ=; b=Ma/8K018eBW2+i74Xq1jLfbpEe+sNWhxdw6szJ1Seks6mcTFTpdkhOyofaEFvS0C1p N5UOvLKnyLPlh5722TGWF5Yosdn0BxdSdndSUoDNapfCVdHoe59Vt4ug82c3OaOpEpzs UgWHohI5NlDP6egH0HDovIsYchPf4ZZhBy7hhZiDJkv3kisHCCVAJV/7OYXnT7wcmgDH vGLnx6bGZvqH3ihWIOHYhRWjFZZbHDXrh9tJb8l+V7qkMLfl9JpNu43VlJ6u4g108Fd0 QluJ5g6Gf3aMkh8QXl9M8CuYedKCspYe3xD/Qo3K+TFeRH4E5o1hmHAtDcZq05qplUQ5 UG2Q== X-Gm-Message-State: AOJu0YxvkwTFtyidT907tN5KC8+7bsjCVGin97XQVuGedqvMnG24j9Zg caFfd2F0Ywaaf4RxFXQl1eJj0hthjPQkNxzTGGuxnQ== X-Google-Smtp-Source: AGHT+IHvACQIfnnHHA6n+w3Wxt8ZDbGZJsBh7ZJm5gdHUbjQ94wV6xz/3BluQF208DtLJh+9Jk9xU0E8udtlvRXHJko= X-Received: by 2002:a67:f5c1:0:b0:44d:4196:f374 with SMTP id t1-20020a67f5c1000000b0044d4196f374mr2780002vso.14.1693573202207; Fri, 01 Sep 2023 06:00:02 -0700 (PDT) MIME-Version: 1.0 References: <20230708051825.64839-1-kmatsui@gcc.gnu.org> <20230708051825.64839-2-kmatsui@gcc.gnu.org> In-Reply-To: <20230708051825.64839-2-kmatsui@gcc.gnu.org> From: Ken Matsui Date: Fri, 1 Sep 2023 06:00:00 -0700 Message-ID: Subject: [PING][PATCH v3 2/2] libstdc++: use new built-in trait __is_volatile To: Jonathan Wakely Cc: gcc-patches , "libstdc++" , Ken Matsui Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.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 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: Ping for the use of __is_volatile built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:19=E2=80=AFPM Ken Matsui wr= ote: > > This patch lets libstdc++ use new built-in trait __is_volatile. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_volatile): Use __is_volatile built-= in > trait. > (is_volatile_v): Likewise. > > Signed-off-by: Ken Matsui > --- > libstdc++-v3/include/std/type_traits | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/= std/type_traits > index 0e7a9c9c7f3..db74b884b35 100644 > --- a/libstdc++-v3/include/std/type_traits > +++ b/libstdc++-v3/include/std/type_traits > @@ -773,6 +773,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > : public true_type { }; > > /// is_volatile > +#if __has_builtin(__is_volatile) > + template > + struct is_volatile > + : public __bool_constant<__is_volatile(_Tp)> > + { }; > +#else > template > struct is_volatile > : public false_type { }; > @@ -780,6 +786,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > template > struct is_volatile<_Tp volatile> > : public true_type { }; > +#endif > > /// is_trivial > template > @@ -3214,10 +3221,16 @@ template > inline constexpr bool is_const_v =3D false; > template > inline constexpr bool is_const_v =3D true; > + > +#if __has_builtin(__is_volatile) > +template > + inline constexpr bool is_volatile_v =3D __is_volatile(_Tp); > +#else > template > inline constexpr bool is_volatile_v =3D false; > template > inline constexpr bool is_volatile_v =3D true; > +#endif > > template > inline constexpr bool is_trivial_v =3D __is_trivial(_Tp); > -- > 2.41.0 >