public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6748] libstdc++: Fix test for hash<coroutine_handle<P>>::operator() [PR109165]
@ 2023-03-18  9:54 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-03-18  9:54 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:9b83d4755a7da02f25788fce14bec949e7045f8f

commit r13-6748-g9b83d4755a7da02f25788fce14bec949e7045f8f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Mar 17 11:39:55 2023 +0000

    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.

Diff:
---
 libstdc++-v3/testsuite/18_support/coroutines/hash.cc | 5 +++--
 1 file 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 68e5e640477..81b68f8246a 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 );
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-18  9:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18  9:54 [gcc r13-6748] libstdc++: Fix test for hash<coroutine_handle<P>>::operator() [PR109165] Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).