gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor10.C
raw| 1 | // PR c++/94819 |
| 2 | // { dg-do compile { target concepts } } |
| 3 | |
| 4 | struct dna4 {}; |
| 5 | struct rna4 {}; |
| 6 | |
| 7 | struct alphabet_tuple_base { |
| 8 | template <typename component_type> |
| 9 | requires __is_same(component_type, rna4) |
| 10 | alphabet_tuple_base(component_type) {} |
| 11 | }; |
| 12 | |
| 13 | struct structured_rna : alphabet_tuple_base { |
| 14 | using alphabet_tuple_base::alphabet_tuple_base; |
| 15 | }; |
| 16 | |
| 17 | structured_rna t2{dna4{}}; // { dg-error "no match" } |
| 18 | structured_rna t3{rna4{}}; // { dg-bogus "no match" } |