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 37E843858C3A for ; Fri, 26 Nov 2021 23:26:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37E843858C3A Received: from mail-yb1-f200.google.com (mail-yb1-f200.google.com [209.85.219.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-268-qYF5GIxpM4GbRzxnS28qPQ-1; Fri, 26 Nov 2021 18:26:42 -0500 X-MC-Unique: qYF5GIxpM4GbRzxnS28qPQ-1 Received: by mail-yb1-f200.google.com with SMTP id g25-20020a25b119000000b005c5e52a0574so12722808ybj.5 for ; Fri, 26 Nov 2021 15:26:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YnTkW36DvNdmMuIq6c02k84u1ZRDpWMsIC/+KoPMKwM=; b=C/dUHTIl35tz5IkcXrwoHhV2Aeefz6oS086R75RnvHOJeR3ug4pbnJeDRnFthmedID azjf+Zz4HG4dc0Zr3mvsoFaAYPvOXXPkOxnlNzBROFuk7NukEASd8qebSaYcJCVPt3hy 5CRPKJnOiC8NWg73ec76EDr131Kt7ZhLLKeXXv0GjMaBOtNZAFMW263DuQh8dvyZIKdI Oo/SWiXTFVgpv28YIA59jCfR3HOjSyEGURIlXoULDrK8qACygQ+Zys5ukVG+JQpMiPcl A22gv834YxTGVJNbFht+adqeeRcD2MsbRbfw5Uk5ltaw2UXDYYV1pXcwbMyMV2gC+oV+ rRuQ== X-Gm-Message-State: AOAM533sbsBo3maTsj2nPcRiN1r6NwaY2fr6zVDzyYWiKRsV1hov3tt/ xq6BCOB4F85J5+2T6BHTdXprzEsWKhHTyLtCP6dPrjsVqdXNYvYIGFilEVfoynta/gXhML1cjW7 ieZaWUJThscg3oo4MljmMkD102gtNK9c= X-Received: by 2002:a25:238a:: with SMTP id j132mr19367309ybj.530.1637969201761; Fri, 26 Nov 2021 15:26:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwU8Tq3eQIR6FsWgQOQTQhL79xgujI1URiNmxrvwuaA3MFWR6n4Z+YsSASm98Rff6jwntMsnjuNwnOzcMeWBPg= X-Received: by 2002:a25:238a:: with SMTP id j132mr19367289ybj.530.1637969201539; Fri, 26 Nov 2021 15:26:41 -0800 (PST) MIME-Version: 1.0 References: <20211126122925.1626170-1-jwakely@redhat.com> <20211126123950.GG2646553@tucnak> In-Reply-To: From: Jonathan Wakely Date: Fri, 26 Nov 2021 23:26:30 +0000 Message-ID: Subject: [PATCH v2] libstdc++: Define std::__is_constant_evaluated() for internal use To: Jakub Jelinek Cc: "libstdc++" , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="000000000000697c4305d1b96c23" X-Spam-Status: No, score=-15.0 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_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2021 23:26:48 -0000 --000000000000697c4305d1b96c23 Content-Type: text/plain; charset="UTF-8" On Fri, 26 Nov 2021 at 12:43, Jonathan Wakely wrote: > > On Fri, 26 Nov 2021 at 12:39, Jakub Jelinek wrote: > > > > On Fri, Nov 26, 2021 at 12:29:25PM +0000, Jonathan Wakely via Gcc-patches wrote: > > > + // Internal version of std::is_constant_evaluated() for C++11. > > > + // This can be used without checking if the compiler supports the built-in. > > > + constexpr inline bool > > > + __is_constant_evaluated() noexcept > > > + { > > > > When you have such a nice one spot, shouldn't it: > > #if __cpp_if_consteval >= 202106L > > if consteval > > { > > return true; > > } > > else > > { > > return false; > > } > > #elif __has_builtin(__builtin_is_constant_evaluated) > > ... > > > > Theoretically not all compilers need to support the builtin and in C++23 > > mode if consteval should be slightly more efficient. > > Yes, good idea. We actually still have two spots, because we still > have std::is_constant_evaluated as well, which is only defined if it > actually works. But we can use the same implementation in there (or > make it call std::__is_constant_evaluated()). I'll prepare a new patch > soon. > > > One disadvantage of std::__is_constant_evaluated() is that Marek's > > warning for if constexpr (std::is_constant_evaluated()) will not trigger > > if __is_constant_evaluated() is used instead. But I'd hope testsuite > > coverage would discover it quickly if such bug would appear... > > Yes, and I hope I won't make that mistake anyway, or miss it in reviews. > > It's a good warning for users, but I like to think I don't need it > (and now we start the sweepstake on how many days until I push a patch > making exactly that mistake ;-) Who had -15 days in the sweepstake? r12-5187 did it. Fixed in r12-5552. Here's a new WIP patch for __is_constant_evaluated. --000000000000697c4305d1b96c23 Content-Type: text/plain; charset="US-ASCII"; name="patch.txt" Content-Disposition: attachment; filename="patch.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kwh0jyte0 Y29tbWl0IDM1NjljNWY3NmFkOWZjOTFiMzI3YTk3ZTljYjZkNWRkMGYzODM1OGEKQXV0aG9yOiBK b25hdGhhbiBXYWtlbHkgPGp3YWtlbHlAcmVkaGF0LmNvbT4KRGF0ZTogICBGcmkgTm92IDI2IDIz OjI1OjAzIDIwMjEKCiAgICBsaWJzdGRjKys6IERlZmluZSBzdGQ6Ol9faXNfY29uc3RhbnRfZXZh bHVhdGVkKCkgZm9yIGludGVybmFsIHVzZQogICAgCiAgICBUaGlzIGFkZHMg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Mvc3Rs X2NvbnN0cnVjdC5oIChfQ29uc3RydWN0LCBfRGVzdHJveSwgX0Rlc3Ryb3lfbik6CiAgICAgICAg ICAgIFJlcGxhY2UgaXNfY29uc3RhbnRfZXZhbHVhdGVkIHdpdGggX19pc19jb25zdGFudF9ldmFs dWF0ZWQuCiAgICAgICAgICAgICogaW5jbHVkZS9iaXRzL3N0bF9mdW5jdGlvbi5oIChncmVhdGVy LCBsZXNzLCBncmVhdGVyX2VxdWFsKQogICAgICAgICAgICAobGVzc19lcXVhbCk6IFJlcGxhY2Ug X19idWlsdGluX2lzX2NvbnN0YW50X2V2YWx1YXRlZCBhbmQKICAgICAgICAgICAgX19idWlsdGlu X2NvbnN0YW50X3Agd2l0aCBfX2lzX2NvbnN0YW50X2V2YWx1YXRlZC4KICAgICAgICAgICAgKiBp bmNsdWRlL2JpdHMvc3RsX3ZlY3Rvci5oOiBDYWxsIHN0ZDo6aXNfY29uc3RhbnRfZXZhbHVhdGVk KCkKICAgICAgICAgICAgaW4gQysrMjAtb25seSBjb2RlLgogICAgICAgICAgICAqIGluY2x1ZGUv ZGVidWcvaGVscGVyX2Z1bmN0aW9ucy5oIChfX2NoZWNrX3Npbmd1bGFyKTogVXNlCiAgICAgICAg ICAgIF9faXNfY29uc3RhbnRfZXZhbHVhdGVkIGluc3RlYWQgb2YgYnVpbHQtaW4sIG9yIHJlbW92 ZSBjaGVjawogICAgICAgICAgICBlbnRpcmVseS4KICAgICAgICAgICAgKiBpbmNsdWRlL3N0ZC9h cnJheSAob3BlcmF0b3I8PT4pOiBVc2UgX19pc19jb25zdGFudF9ldmFsdWF0ZWQKICAgICAgICAg ICAgdW5jb25kaXRpb25hbGx5LgogICAgICAgICAgICAqIGluY2x1ZGUvc3RkL2JpdCAoX19iaXRf Y2VpbCk6IExpa2V3aXNlLgogICAgICAgICAgICAqIGluY2x1ZGUvc3RkL3R5cGVfdHJhaXRzIChp c19jb25zdGFudF9ldmFsdWF0ZWQpOiBEZWZpbmUgdXNpbmcKICAgICAgICAgICAgJ2lmIGNvbnN0 ZXZhbCcgaWYgcG9zc2libGUuCiAgICAgICAgICAgICogaW5jbHVkZS9zdGQvdmVyc2lvbjogVXNl IG5ldyBtYWNyby4KICAgICAgICAgICAgKiBsaWJzdXBjKysvY29tcGFyZTogVXNlIF9faXNfY29u c3RhbnRfZXZhbHVhdGVkIGluc3RlYWQgb2YKICAgICAgICAgICAgX19idWlsdGluX2lzX2NvbnN0 YW50X2V2YWx1YXRlZC4KICAgICAgICAgICAgKiB0ZXN0c3VpdGUvMjNfY29udGFpbmVycy9hcnJh eS90dXBsZV9pbnRlcmZhY2UvZ2V0X25lZy5jYzoKICAgICAgICAgICAgQWRqdXN0IGRnLWVycm9y IGxpbmVzLgoKZGlmZiAtLWdpdCBhL2xpYnN0ZGMrKy12My9kb2MvZG94eWdlbi91c2VyLmNmZy5p biBiL2xpYnN0ZGMrKy12My9kb2MvZG94eWdlbi91c2VyLmNmZy5pbgppbmRleCAxN2NkNmZjMWMw ZS4uMmYxNWYyYzFiODIgMTAwNjQ0Ci0tLSBhL2xpYnN0ZGMrKy12My9kb2MvZG94eWdlbi91c2Vy LmNmZy5pbgorKysgYi9saWJzdGRjKystdjMvZG9jL2RveHlnZW4vdXNlci5jZmcuaW4KQEAgLTIz OTksNyArMjM5OSw3IEBAIFBSRURFRklORUQgICAgICAgICAgICAgPSBfX2NwbHVzcGx1cz0yMDIw MDJMIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAiX19oYXNfYnVpbHRpbih4KT0xIiBcCiAg ICAgICAgICAgICAgICAgICAgICAgICAgX0dMSUJDWFhfSEFWRV9CVUlMVElOX0hBU19VTklRX09C Sl9SRVAgXAogICAgICAgICAgICAgICAgICAgICAgICAgIF9HTElCQ1hYX0hBVkVfQlVJTFRJTl9J U19BR0dSRUdBVEUgXAotICAgICAgICAgICAgICAgICAgICAgICAgIF9HTElCQ1hYX0hBVkVfQlVJ TFRJTl9JU19DT05TVEFOVF9FVkFMVUFUR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