From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 9A1F83858011; Tue, 4 Oct 2022 14:07:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A1F83858011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664892429; bh=T8E7q5zxkJ4We39p3ItuyTCZO8ndgOkdiVgx3tjFRG4=; h=From:To:Subject:Date:From; b=x0H1AT5IkcLpFquHjVHTSj9lIid4Xg8bTMn/ZBZ0m2ITtDEv8SECSituHbrFxST9T QEuhgoOu0HhMI8KTVphTBcN7e3CCGD/h27CqRDTPIUpU5cvbGSlCTJ6EL7LfSBnoPW +VRO/6xt4ilMim9LJ12EEuI+lwxYhn/Tz5cSmcnk= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-3060] libstdc++: Enable std::hash> [PR107139] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 7cdab65f3d770345903023f357b6ca96bc85a002 X-Git-Newrev: b74ab7a1609f01afaab9b82cfabfb96ae9e1145d Message-Id: <20221004140709.9A1F83858011@sourceware.org> Date: Tue, 4 Oct 2022 14:07:09 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b74ab7a1609f01afaab9b82cfabfb96ae9e1145d commit r13-3060-gb74ab7a1609f01afaab9b82cfabfb96ae9e1145d Author: Jonathan Wakely Date: Tue Oct 4 09:37:14 2022 +0100 libstdc++: Enable std::hash> [PR107139] Everything that depends on is available for freestanding now. libstdc++-v3/ChangeLog: PR libstdc++/107139 * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor conditionals. Diff: --- 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