From: Jonathan Wakely Date: Tue, 4 Oct 2022 08:37:14 +0000 (+0100) Subject: libstdc++: Enable std::hash> [PR107139] X-Git-Tag: basepoints/gcc-14~4147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b74ab7a1609f01afaab9b82cfabfb96ae9e1145d;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine index f4189c7e3fcf..ebaf11d701fb 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