From patchwork Tue Oct 4 14:11:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp148598wrs; Tue, 4 Oct 2022 07:13:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TQe5XOhzdwu8nokSj6fbQVXQRI0FhNOqvn3xa17ntge/d+qZy7xz0R0qFniLr3ApcgS0W X-Received: by 2002:a17:907:988c:b0:78c:e54b:9030 with SMTP id ja12-20020a170907988c00b0078ce54b9030mr5268054ejc.149.1664892781425; Tue, 04 Oct 2022 07:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664892781; cv=none; d=google.com; s=arc-20160816; b=f40lV80MmZKaMCmNSO4C61Fuhetuz3diSeexlms8eBdurB3JoNVeRj1MK6hUjETPaJ y8hNHRnHjUf5GJZR/sqhvJCuf9MECe4pY5Q608rtnPX/b0gVjyNXS/SA3HrOK1LZ+D4x Vtgfd2uWfP9MrWAKH51o24nZqPTMbTdHyEkzpbFLOpSCHAZTKlT3Lv2NTKBmVLo0Y3TE 4QBZekVlfA+TnIBYUZJorw997hPamwRj7D9bowgl9z/MhilYSTzEiAIgAZnGfujUsG/l 9RD+okGuKLytCDLyxZxaJoY0lFbA/B/F71e2uWsbZZsUhnU0RUmICggmqA9p/q54HyQZ I2IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=d1VdGxvqvACxG26w2JkkubRI1RpS61vQFHH5DfmA4kA=; b=xX1evYimIkJFQYCAFMuiJ1B+/zRuQ1VUIa45fQLLTzraQf4ZBWhmpOVOuSV8QhkIgx hj716Po7weJVRBaqvyZv0PH6o3ZgOG/euYMisNfE8Qv6jFOj2CZJiX2Gz4U6b1tVwkw6 wQLDLOJXxj7PBVjh3oyp5PvGb4V38bp7E62GZqz/YtelFv/pbhT41ZIZALyiyCIf70rw u+wQaRaE1h2/3vC6+agMikf0JqjpbGP4+S9Jl3exTR3Z+v0kXdmIcub9qGqV4vD9H8Ni Mj9k3zymDRS7SFkbDY1w7yGtcFz9RNiO1427iHdMnJ52rpGTR3E+rum4D2XBTYvI6Q+8 ca8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NzUOoDUg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bq21-20020a056402215500b004462de364fesi10131137edb.597.2022.10.04.07.13.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 07:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NzUOoDUg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 512D13852746 for ; Tue, 4 Oct 2022 14:12:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 512D13852746 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664892745; bh=d1VdGxvqvACxG26w2JkkubRI1RpS61vQFHH5DfmA4kA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NzUOoDUgZ2aKP83Pzz9Yq7UftcQvqO3UWfyfX/6f9E/4Nd1ypcYOh+vN7BqRjEy8j 7GmxE5cj4Q8APAGnQwmSWWJWrtukjWhs2EfLY6maxkDMsONwQ/nHaORFH70FuE5sNT XyCWdFxy0+2tRmIfxAyn+J1U9ajFkqswKhEb7aPM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 24BAB3858CDA for ; Tue, 4 Oct 2022 14:11:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 24BAB3858CDA Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-48-GqOMSE3yPTqJuCd-El8Bvw-1; Tue, 04 Oct 2022 10:11:41 -0400 X-MC-Unique: GqOMSE3yPTqJuCd-El8Bvw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 56073185A792; Tue, 4 Oct 2022 14:11:41 +0000 (UTC) Received: from localhost (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2155340C6EC2; Tue, 4 Oct 2022 14:11:41 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Enable std::hash> [PR107139] Date: Tue, 4 Oct 2022 15:11:37 +0100 Message-Id: <20221004141138.530214-3-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.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_NONE, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745766613264414437?= X-GMAIL-MSGID: =?utf-8?q?1745766613264414437?= Tested powerpc64le-linux, and x86_64-linux with -ffreestanding. Pushed to trunk. -- >8 -- Everything that depends on is available for freestanding now. libstdc++-v3/ChangeLog: PR libstdc++/107139 * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor conditionals. --- libstdc++-v3/include/std/coroutine | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine index f4189c7e3fc..ebaf11d701f 100644 --- a/libstdc++-v3/include/std/coroutine +++ b/libstdc++-v3/include/std/coroutine @@ -39,7 +39,7 @@ # include #endif -#if !defined __cpp_lib_three_way_comparison && _GLIBCXX_HOSTED +#if !defined __cpp_lib_three_way_comparison # include // for std::less #endif @@ -165,11 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr bool operator<(coroutine_handle<> __a, coroutine_handle<> __b) noexcept { -#if _GLIBCXX_HOSTED return less()(__a.address(), __b.address()); -#else - return (__UINTPTR_TYPE__)__a.address() < (__UINTPTR_TYPE__)__b.address(); -#endif } constexpr bool @@ -343,7 +339,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } // namespace __n4861 -#if _GLIBCXX_HOSTED template struct hash; template @@ -355,10 +350,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return reinterpret_cast(__h.address()); } }; -#endif #else -#error "the coroutine header requires -fcoroutines" +#error "the header requires -fcoroutines" #endif _GLIBCXX_END_NAMESPACE_VERSION