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 0AAB8385842D for ; Tue, 8 Aug 2023 20:07:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0AAB8385842D 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=1691525241; 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=eky8eu/+dNOltHCzBnAG+H6OC+H4Zh6NGpO+M6plvUo=; b=OCYv3hxb1vEiJBc9MhvfSTBLUQ/z2d/hg9OW9gfgEDuhxaC/22npzAN+1nDfvyv+W1bjcq mPPixhRs742AB8Rlr/ebQK2EgfzxUNOn3tjnn26cpTmcpL6+y43maNj2p8UehJKSdvuefJ qUjfx0PcQRpu4SGtFfK0MuDVXLu35Oo= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-aJZ39869OVKDtcc4-8VTDw-1; Tue, 08 Aug 2023 16:07:18 -0400 X-MC-Unique: aJZ39869OVKDtcc4-8VTDw-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ba37b5519fso30386791fa.2 for ; Tue, 08 Aug 2023 13:07:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691525236; x=1692130036; 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=eky8eu/+dNOltHCzBnAG+H6OC+H4Zh6NGpO+M6plvUo=; b=G4jiZboBlh5bE4Lzokt6Q2kGrXUKNJbjGsKYhxuxeo7tSS+7ElblJDN7KpynO0grC3 S9mbXz+6ma0Jj9tndJDB/IOUYxVKUZBCYhNypwdkWwPw8HObX+TGKC6nhX/NkXlbu2hQ Z4LJ9p52Cq+AbF6ZFoGel9M1wCGXkuR11tHhEXL+FGnXPdMI+B3fbj12R2BQFP84iNib +iGx8oIbTXmkJ8Q9Ly0D+gkjpVWvda/OvqWuEBx0POADFrNUw9+abN1qD9Xorw+8JPw+ Ua7ZxPKLP7c5KWciMQddyK5jHab6PPwyVPrLgowTkoYa6BRH8LbBiH+MEAeZvRHfd8X4 sh/A== X-Gm-Message-State: AOJu0YzGIT95EbDH54qxXsFlN/ZCZegsOXOx3PFeJdldqJh9S5eObnxG KKWwaRDXbdFh81FOwJbDir8dMjvwyQ1u5RBjmnbp3LLjhLNbPeGlNN5RAMfT9w/MjRoEfTihwFg G0HmSkKq6ytaKKr2sy4p0+faREnu0clk= X-Received: by 2002:a2e:9115:0:b0:2b6:fc80:c45f with SMTP id m21-20020a2e9115000000b002b6fc80c45fmr444741ljg.13.1691525235976; Tue, 08 Aug 2023 13:07:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHv2V9hp8JjO0VrVuhIEocVTkYNdgsgGsLy39Xj3LlaXFTWp5Vz0fj7mF5bMUF1An1Y55KkT6AZQEbSVylBL8o= X-Received: by 2002:a2e:9115:0:b0:2b6:fc80:c45f with SMTP id m21-20020a2e9115000000b002b6fc80c45fmr444728ljg.13.1691525235625; Tue, 08 Aug 2023 13:07:15 -0700 (PDT) MIME-Version: 1.0 References: <20230715030156.26231-1-kmatsui@gcc.gnu.org> In-Reply-To: <20230715030156.26231-1-kmatsui@gcc.gnu.org> From: Jonathan Wakely Date: Tue, 8 Aug 2023 21:07:04 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Use __bool_constant entirely To: Ken Matsui Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000cc661106026ee895" X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,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: --000000000000cc661106026ee895 Content-Type: text/plain; charset="UTF-8" On Sat, 15 Jul 2023 at 04:02, Ken Matsui via Libstdc++ < libstdc++@gcc.gnu.org> wrote: > This patch uses __bool_constant entirely instead of integral_constant > in the type_traits header, specifically for true_type, false_type, > and bool_constant. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (true_type): Use __bool_constant > instead. > (false_type): Likewise. > (bool_constant): Likewise. > > Signed-off-by: Ken Matsui > --- > libstdc++-v3/include/std/type_traits | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/libstdc++-v3/include/std/type_traits > b/libstdc++-v3/include/std/type_traits > index 9f086992ebc..7dc5791a7c5 100644 > --- a/libstdc++-v3/include/std/type_traits > +++ b/libstdc++-v3/include/std/type_traits > @@ -78,24 +78,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION > constexpr _Tp integral_constant<_Tp, __v>::value; > #endif > > - /// The type used as a compile-time boolean with true value. > - using true_type = integral_constant; > - > - /// The type used as a compile-time boolean with false value. > - using false_type = integral_constant; > - > /// @cond undocumented > /// bool_constant for C++11 > template > using __bool_constant = integral_constant; > /// @endcond > > + /// The type used as a compile-time boolean with true value. > + using true_type = __bool_constant; > + > + /// The type used as a compile-time boolean with false value. > + using false_type = __bool_constant; > + > #if __cplusplus >= 201703L > # define __cpp_lib_bool_constant 201505L > /// Alias template for compile-time boolean constant types. > /// @since C++17 > template > - using bool_constant = integral_constant; > + using bool_constant = __bool_constant<__v>; > #endif > > // Metaprogramming helper types. > > This seems a bit pointless IMHO, but I suppose it makes things more consistent. OK for trunk. --000000000000cc661106026ee895--