gcc/testsuite/g++.dg/conversion/ref8.C
raw| 1 | // PR c++/105766 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template<class T> |
| 5 | struct baz { |
| 6 | baz() = default; |
| 7 | baz(int) requires requires { T(0); }; |
| 8 | }; |
| 9 | |
| 10 | struct foo; |
| 11 | |
| 12 | struct bar { |
| 13 | bar() = default; |
| 14 | bar(foo&); |
| 15 | bar(int); |
| 16 | }; |
| 17 | |
| 18 | struct foo { |
| 19 | baz<bar> m_bars; |
| 20 | }; |
| 21 | |
| 22 | foo a; |