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 5084A3857725 for ; Tue, 20 Jun 2023 16:11:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5084A3857725 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=1687277512; 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: in-reply-to:in-reply-to:references:references; bh=YSLvyrxpt8iWDY5sISawyoiwNu76S2ECbKes24v5FCM=; b=JHzO7fHKqx7+R/b+F+oET/cl5a55iUjRijp4UhqKDYIAVDj9eosKrt53ZC+iBTG41l8ztO Q1M81GnUF4Q6m/wgbGFrxseXVnzZBDUaX8jtim72gjfpatdJ/Qu2OZ8pFjvkJVIV64pHMG JY+6yngXnkWCL+UKYijfWO3LEw2+H60= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-194-d4VOurxUNbKOmaowbmOKAQ-1; Tue, 20 Jun 2023 12:11:42 -0400 X-MC-Unique: d4VOurxUNbKOmaowbmOKAQ-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-62febe50f84so62401876d6.3 for ; Tue, 20 Jun 2023 09:11:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687277502; x=1689869502; h=mime-version:references:message-id:in-reply-to:subject:cc:to:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YSLvyrxpt8iWDY5sISawyoiwNu76S2ECbKes24v5FCM=; b=WHXNVVNd860dY89LgWBNQNmMobKlA4vxO2khwU3T84+DXcF33BGNhKOrEw/rMMkKai gPkZtl6rpwWkKeVX6EbpyEZraM2nqIVOibLy96WJ/INNm7PX207RKUc2P3cRkSEYrwYV F9FPS+6fcYMKun47sICWz9NKfvl2kOjgvioAKwGoJSSZrEVtzjXlqH4pTWHiqM1BRAO7 6mTDklflR2tmeaytG0kP3e4juvGS+mC0cyqDmHKgNIgxSNjEcFIg6CDwlcNXUJlxxOWO yDOC+VUpgbZoa/YRSmi9zKNTAibG3SFCkK/Sj7rm/Mv3q9BaygMjoy9tvi8KrM9EYkUH nLBA== X-Gm-Message-State: AC+VfDwNDC9pfIl7NegI3qoQcj0IOTaBoTceMOQjVWKRAiWkIm2oscUe Q19FUXDGj+XTcvxTMFQ3c8SrrUApIuJbsqgxEZIVvJLdgjjy1GcB21Qedp1cYhuUl9NW3ktnrHb z5Fq3aG6smqQJD4c= X-Received: by 2002:ad4:5b81:0:b0:5df:4d41:954d with SMTP id 1-20020ad45b81000000b005df4d41954dmr15521462qvp.3.1687277501864; Tue, 20 Jun 2023 09:11:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ktkyYc4gjRqe+V/4RY31OuGQq8wDNw7wuOogOvQhUHOZt3itzQrE7SbztlPW0Gjte1uRr/Q== X-Received: by 2002:ad4:5b81:0:b0:5df:4d41:954d with SMTP id 1-20020ad45b81000000b005df4d41954dmr15521441qvp.3.1687277501597; Tue, 20 Jun 2023 09:11:41 -0700 (PDT) Received: from [192.168.1.130] (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id a15-20020a0ce38f000000b00626195bdbbdsm1367504qvl.132.2023.06.20.09.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 09:11:41 -0700 (PDT) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Tue, 20 Jun 2023 12:11:40 -0400 (EDT) To: Ken Matsui cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, ppalka@redhat.com Subject: Re: [PATCH 2/2] libstdc++: use new built-in trait __is_const In-Reply-To: <20230322001142.13422-2-kmatsui@cs.washington.edu> Message-ID: <29f3aa23-aa8e-b8f0-df9b-7c5812d68a90@idea> References: <20230322001142.13422-1-kmatsui@cs.washington.edu> <20230322001142.13422-2-kmatsui@cs.washington.edu> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-13.8 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_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 Tue, 21 Mar 2023, Ken Matsui wrote: > This patch lets libstdc++ use new built-in trait __is_const. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_const): Use __is_const built-in trait. We should also use it in is_const_v (likewise for the __is_array and __is_volatile patches). > --- > 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..e77de828501 100644 > --- a/libstdc++-v3/include/std/type_traits > +++ b/libstdc++-v3/include/std/type_traits > @@ -764,6 +764,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > // Type properties. > > /// is_const > +#if __has_builtin(__is_const) > + template > + struct is_const > + : public __bool_constant<__is_const(_Tp)> > + { }; > +#else > template > struct is_const > : public false_type { }; > @@ -771,6 +777,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > template > struct is_const<_Tp const> > : public true_type { }; > +#endif > > /// is_volatile > template > -- > 2.40.0 > >