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 24BAB3858CDA for ; Tue, 4 Oct 2022 14:11:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 24BAB3858CDA 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=1664892702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d1VdGxvqvACxG26w2JkkubRI1RpS61vQFHH5DfmA4kA=; b=LHN8z1WArw+YQea3o25rj4U4mr4MyCAMkhGFSZEd7yj/z82NaY7YQYhWDlN8MVjbuCFQV2 OVsO6y3RW+npVFtl4v4FXK3b54PzdF6jdJgf6i1fBeYMjQ1tFfoHOfC6pVrKkq5S16BwnC Ky9LZGGNVE8xrVKpkS2xxaXWviS+dew= 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) From: Jonathan Wakely 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 Content-Type: text/plain Content-Transfer-Encoding: 8bit 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 List-Id: 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 -- 2.37.3