Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor11.C

raw
1 // PR c++/94819
2 // { dg-do compile { target concepts } }
3
4 struct dna4 {};
5 struct rna4 {};
6
7 template <typename component_types>
8 struct alphabet_tuple_base {
9 template <typename component_type>
10 requires __is_same(component_type, component_types)
11 alphabet_tuple_base(component_type) {}
12 };
13
14 template <typename sequence_alphabet_t>
15 struct structured_rna : alphabet_tuple_base<sequence_alphabet_t> {
16 using base_type = alphabet_tuple_base<sequence_alphabet_t>;
17 using base_type::base_type;
18 };
19
20 structured_rna<rna4> t2{dna4{}}; // { dg-error "no match" }
21 structured_rna<rna4> t3{rna4{}}; // { dg-bogus "no match" }