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.129.124]) by sourceware.org (Postfix) with ESMTPS id F128A3857343 for ; Wed, 17 May 2023 15:53:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F128A3857343 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=1684338799; 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=zfA+SioSQrYhJ4D6LjTndxjDhDgALR5I5UF56r+qjAA=; b=OsXMikNidi5Y+Y6iTqDYFQPlxs+XWkBXikIOMoRG0ZWkJsbkHchdtzEVzdwNVU1OCU6lYM dgQLNswOAtj+SlPPsJMG+YpiWJ9A/p/qwrAkIPFv8Jz5+SzNpMOQlXj0KSIJQiS6dUB3bU Qd6UefqY/uaVkW3zjpnp5hpX9fEX1lg= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-171--QJZ1oayNMSfXJPwVScvYw-1; Wed, 17 May 2023 11:53:18 -0400 X-MC-Unique: -QJZ1oayNMSfXJPwVScvYw-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6237c937691so1227936d6.0 for ; Wed, 17 May 2023 08:53:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684338797; x=1686930797; 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=WXJd9kZ6B62pu2+JPasXsjtO0W0buEYb8VT/f0+XX2M=; b=PZesUwtIfg9TafIQ8YQ3XWx7gwWjZgej5DAcae7RC58mRrQduXbYERcKx+UppvDsWq brIV+CM7jx9TqNQeXgeAlG/wyJpkR5w0e6MuvkkbKZD57Snsc8tVZGxvqskprENbUDOz gKwCBmvy8rswCMqpwova4iAiS33OQwZBq9CgrUdGPq2jgwwSgdiebb8Sff6INhifj1P8 hWT/zAWyghsF0+Ba4X4kgiLYWEiiGy/IXvfDC5c6B9e0HJ8JDd8k2jIRiZF3hMBI0Qq6 5mpoz3nrO/ssI+wL46Sjf2B4G4JelDS5W7esHz6oICvMG3s+GbpYbGGnH4dxCwIwYrYa rMKQ== X-Gm-Message-State: AC+VfDwK7YRxwD/uVu8G0kVTC1/qi3yWvefWg7xzPEjP54+JenwHD/EJ yxZCgK5SmxftHSK0BVMrEXS8xnlxHhLR5qmpyYajf4ufl12dGf9MAxaBDNnuC9w+2NlZRd/xc5O d9em8U2togyFG3P1CayjcGknwbg== X-Received: by 2002:a05:6214:301e:b0:61b:6421:f3c3 with SMTP id ke30-20020a056214301e00b0061b6421f3c3mr4565629qvb.13.1684338797473; Wed, 17 May 2023 08:53:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ46gIpPiopJcU26JgU7ajZ8WBYIdTPZAeJlNQJeZkjCMZcwJorujdfHQXrHNJ3MjB5oGIyQQA== X-Received: by 2002:a05:6214:301e:b0:61b:6421:f3c3 with SMTP id ke30-20020a056214301e00b0061b6421f3c3mr4565594qvb.13.1684338797161; Wed, 17 May 2023 08:53:17 -0700 (PDT) Received: from [192.168.1.130] (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id nd22-20020a056214421600b0061b63237be3sm6429832qvb.131.2023.05.17.08.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 08:53:16 -0700 (PDT) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Wed, 17 May 2023 11:53:15 -0400 (EDT) To: Ken Matsui cc: Jonathan Wakely , gcc-patches , libstdc++ , Jonathan Wakely , Ville Voutilainen Subject: Re: [PATCH] libstdc++: use __bool_constant instead of integral_constant In-Reply-To: Message-ID: <33d79daf-60e5-e285-6e12-d3e4abfc1b97@idea> References: <20230323110608.42262-1-kmatsui@cs.washington.edu> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="8323329-1317276489-1684338796=:278865" 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,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1317276489-1684338796=:278865 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Fri, 12 May 2023, Ken Matsui via Libstdc++ wrote: > It appears that GCC 13 has been released, but I am wondering if there > are any issues preventing this patch from being merged yet. Can you > provide any information on this? Thanks for the reminder, I pushed this to trunk just now (r14-940-g637edefc5863cf). Congrats on your first libstdc++ commit! > > On Sat, Apr 8, 2023 at 2:08 PM Ken Matsui wrote: > > > > I see. Thank you! > > > > On Sat, Apr 8, 2023 at 12:52 AM Jonathan Wakely wrote: > > > > > > This looks good, thanks, but we're too close to the gcc 13 release now, and this isn't fixing any bugs. I'll push it after the release. > > > > > > > > > On Thu, 23 Mar 2023, 11:07 Ken Matsui via Libstdc++, wrote: > > >> > > >> In the type_traits header, both integral_constant and __bool_constant > > >> are used. This patch unifies those usages into __bool_constant. > > >> > > >> libstdc++-v3/ChangeLog: > > >> > > >> * include/std/type_traits: Use __bool_constant instead of > > >> integral_constant. > > >> > > >> Signed-off-by: Ken Matsui > > >> --- > > >> libstdc++-v3/include/std/type_traits | 32 ++++++++++++++-------------- > > >> 1 file changed, 16 insertions(+), 16 deletions(-) > > >> > > >> diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits > > >> index 2bd607a8b8f..bc6982f9e64 100644 > > >> --- a/libstdc++-v3/include/std/type_traits > > >> +++ b/libstdc++-v3/include/std/type_traits > > >> @@ -578,19 +578,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_enum > > >> template > > >> struct is_enum > > >> - : public integral_constant > > >> + : public __bool_constant<__is_enum(_Tp)> > > >> { }; > > >> > > >> /// is_union > > >> template > > >> struct is_union > > >> - : public integral_constant > > >> + : public __bool_constant<__is_union(_Tp)> > > >> { }; > > >> > > >> /// is_class > > >> template > > >> struct is_class > > >> - : public integral_constant > > >> + : public __bool_constant<__is_class(_Tp)> > > >> { }; > > >> > > >> /// is_function > > >> @@ -784,7 +784,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_trivial > > >> template > > >> struct is_trivial > > >> - : public integral_constant > > >> + : public __bool_constant<__is_trivial(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -793,7 +793,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_trivially_copyable > > >> template > > >> struct is_trivially_copyable > > >> - : public integral_constant > > >> + : public __bool_constant<__is_trivially_copyable(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -802,7 +802,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_standard_layout > > >> template > > >> struct is_standard_layout > > >> - : public integral_constant > > >> + : public __bool_constant<__is_standard_layout(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -817,7 +817,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> struct > > >> _GLIBCXX20_DEPRECATED_SUGGEST("is_standard_layout && is_trivial") > > >> is_pod > > >> - : public integral_constant > > >> + : public __bool_constant<__is_pod(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -831,7 +831,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> struct > > >> _GLIBCXX17_DEPRECATED > > >> is_literal_type > > >> - : public integral_constant > > >> + : public __bool_constant<__is_literal_type(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -840,13 +840,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_empty > > >> template > > >> struct is_empty > > >> - : public integral_constant > > >> + : public __bool_constant<__is_empty(_Tp)> > > >> { }; > > >> > > >> /// is_polymorphic > > >> template > > >> struct is_polymorphic > > >> - : public integral_constant > > >> + : public __bool_constant<__is_polymorphic(_Tp)> > > >> { }; > > >> > > >> #if __cplusplus >= 201402L > > >> @@ -855,14 +855,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// @since C++14 > > >> template > > >> struct is_final > > >> - : public integral_constant > > >> + : public __bool_constant<__is_final(_Tp)> > > >> { }; > > >> #endif > > >> > > >> /// is_abstract > > >> template > > >> struct is_abstract > > >> - : public integral_constant > > >> + : public __bool_constant<__is_abstract(_Tp)> > > >> { }; > > >> > > >> /// @cond undocumented > > >> @@ -873,7 +873,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> > > >> template > > >> struct __is_signed_helper<_Tp, true> > > >> - : public integral_constant > > >> + : public __bool_constant<_Tp(-1) < _Tp(0)> > > >> { }; > > >> /// @endcond > > >> > > >> @@ -1333,7 +1333,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// has_virtual_destructor > > >> template > > >> struct has_virtual_destructor > > >> - : public integral_constant > > >> + : public __bool_constant<__has_virtual_destructor(_Tp)> > > >> { > > >> static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), > > >> "template argument must be a complete class or an unbounded array"); > > >> @@ -1392,7 +1392,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> template > > >> struct is_same > > >> #ifdef _GLIBCXX_HAVE_BUILTIN_IS_SAME > > >> - : public integral_constant > > >> + : public __bool_constant<__is_same(_Tp, _Up)> > > >> #else > > >> : public false_type > > >> #endif > > >> @@ -1408,7 +1408,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > > >> /// is_base_of > > >> template > > >> struct is_base_of > > >> - : public integral_constant > > >> + : public __bool_constant<__is_base_of(_Base, _Derived)> > > >> { }; > > >> > > >> #if __has_builtin(__is_convertible) > > >> -- > > >> 2.40.0 > > >> > > --8323329-1317276489-1684338796=:278865--