gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor8.C
raw| 1 | // PR c++/94549 |
| 2 | // { dg-do compile { target concepts } } |
| 3 | |
| 4 | struct base { |
| 5 | template <typename type> |
| 6 | requires false |
| 7 | base(type); |
| 8 | |
| 9 | template <typename type> |
| 10 | requires true |
| 11 | base(type); |
| 12 | }; |
| 13 | |
| 14 | struct derived : base { |
| 15 | using base::base; |
| 16 | }; |
| 17 | |
| 18 | void foo() { |
| 19 | derived{'G'}; |
| 20 | } |