From: Jonathan Wakely Date: Fri, 17 Mar 2023 11:39:55 +0000 (+0000) Subject: libstdc++: Fix test for hash>::operator() [PR109165] X-Git-Tag: basepoints/gcc-14~459 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b83d4755a7da02f25788fce14bec949e7045f8f;p=thirdparty%2Fgcc.git libstdc++: Fix test for hash>::operator() [PR109165] libstdc++-v3/ChangeLog: PR libstdc++/109165 * testsuite/18_support/coroutines/hash.cc: Use const object in second call. --- diff --git a/libstdc++-v3/testsuite/18_support/coroutines/hash.cc b/libstdc++-v3/testsuite/18_support/coroutines/hash.cc index 68e5e640477b..81b68f8246a3 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 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 ); }