aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-10-04 09:37:14 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-10-04 15:03:28 +0100
commitb74ab7a1609f01afaab9b82cfabfb96ae9e1145d (patch)
treeda4b6bfa402a447fe106a374419c039439bac9c8 /libstdc++-v3
parent7cdab65f3d770345903023f357b6ca96bc85a002 (diff)
downloadgcc-b74ab7a1609f01afaab9b82cfabfb96ae9e1145d.zip
gcc-b74ab7a1609f01afaab9b82cfabfb96ae9e1145d.tar.gz
gcc-b74ab7a1609f01afaab9b82cfabfb96ae9e1145d.tar.bz2
libstdc++: Enable std::hash<coroutine_handle<P>> [PR107139]
Everything that <coroutine> depends on is available for freestanding now. libstdc++-v3/ChangeLog: PR libstdc++/107139 * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor conditionals.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/std/coroutine10
1 files changed, 2 insertions, 8 deletions
diff --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine
index f4189c7..ebaf11d 100644
--- a/libstdc++-v3/include/std/coroutine
+++ b/libstdc++-v3/include/std/coroutine
@@ -39,7 +39,7 @@
# include <compare>
#endif
-#if !defined __cpp_lib_three_way_comparison && _GLIBCXX_HOSTED
+#if !defined __cpp_lib_three_way_comparison
# include <bits/stl_function.h> // 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<void*>()(__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<typename _Tp> struct hash;
template<typename _Promise>
@@ -355,10 +350,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return reinterpret_cast<size_t>(__h.address());
}
};
-#endif
#else
-#error "the coroutine header requires -fcoroutines"
+#error "the <coroutine> header requires -fcoroutines"
#endif
_GLIBCXX_END_NAMESPACE_VERSION