gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor12.C
raw| 1 | // PR c++/116492 |
| 2 | // CWG 2789 |
| 3 | // { dg-do compile { target c++20 } } |
| 4 | |
| 5 | template<class T> |
| 6 | struct A { |
| 7 | A() requires true = delete; |
| 8 | }; |
| 9 | |
| 10 | struct B : A<int> { |
| 11 | B(); |
| 12 | using A<int>::A; |
| 13 | }; |
| 14 | |
| 15 | B b; // OK, selects the non-inherited constructor over the more constrained |
| 16 | // inherited constructor. |