aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor10.C
blob: 387c07ae6b28f02a671953968d764eabf64f78b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/94819
// { dg-do compile { target concepts } }

struct dna4 {};
struct rna4 {};

struct alphabet_tuple_base {
    template <typename component_type>
        requires __is_same(component_type, rna4)
    alphabet_tuple_base(component_type) {}
};

struct structured_rna : alphabet_tuple_base {
    using alphabet_tuple_base::alphabet_tuple_base;
};

structured_rna t2{dna4{}}; // { dg-error "no match" }
structured_rna t3{rna4{}}; // { dg-bogus "no match" }