Skip to content
Snippets Groups Projects
Commit 9b83d475 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Fix test for hash<coroutine_handle<P>>::operator() [PR109165]

libstdc++-v3/ChangeLog:

	PR libstdc++/109165
	* testsuite/18_support/coroutines/hash.cc: Use const object
	in second call.
parent d7caf313
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,12 @@
void
test01()
{
auto coro = std::noop_coroutine();
std::hash<std::noop_coroutine_handle> h;
std::size_t v = h(std::noop_coroutine());
std::size_t v = h(coro);
const auto& ch = h;
std::size_t v2 = h(std::noop_coroutine()); // PR libstdc++/109165
std::size_t v2 = ch(coro); // PR libstdc++/109165
VERIFY( v2 == v );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment