]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/18_support/coroutines/hash.cc
libstdc++: Remove dg-options "-std=gnu++20" from remaining tests
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 18_support / coroutines / hash.cc
CommitLineData
8ccae163 1// { dg-do run { target c++20 } }
c48be829
JW
2
3#include <coroutine>
4#include <testsuite_hooks.h>
5
6void
7test01()
8{
9b83d475 9 auto coro = std::noop_coroutine();
c48be829 10 std::hash<std::noop_coroutine_handle> h;
9b83d475 11 std::size_t v = h(coro);
c48be829
JW
12
13 const auto& ch = h;
9b83d475 14 std::size_t v2 = ch(coro); // PR libstdc++/109165
c48be829
JW
15
16 VERIFY( v2 == v );
17}
18
19int main()
20{
21 test01();
22}