diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-03-17 11:39:55 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-03-18 09:43:20 +0000 |
commit | 9b83d4755a7da02f25788fce14bec949e7045f8f (patch) | |
tree | d85222660e945638123afe0b99c4fb53ea0c1941 | |
parent | d7caf313525a46f200d7f5db1ba893f853774aee (diff) | |
download | gcc-9b83d4755a7da02f25788fce14bec949e7045f8f.zip gcc-9b83d4755a7da02f25788fce14bec949e7045f8f.tar.gz gcc-9b83d4755a7da02f25788fce14bec949e7045f8f.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/testsuite/18_support/coroutines/hash.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/18_support/coroutines/hash.cc b/libstdc++-v3/testsuite/18_support/coroutines/hash.cc index 68e5e64..81b68f8 100644 --- a/libstdc++-v3/testsuite/18_support/coroutines/hash.cc +++ b/libstdc++-v3/testsuite/18_support/coroutines/hash.cc @@ -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 ); } |