Debian Codegraph @

gcc/testsuite/g++.dg/concepts/inherit-ctor3.C

raw
1 // { dg-do compile { target c++17 } }
2 // { dg-options "-fconcepts" }
3
4 template<typename T>
5 concept C = __is_class(T);
6
7 template<typename T>
8 struct S1 {
9 template<C U>
10 S1(U x) { }
11 };
12
13 template<typename T>
14 struct S2 : S1<T> { // { dg-error "no matching function" }
15 using S1<T>::S1;
16 };
17
18 struct X { } x;
19
20 int main() {
21 S2<X> s1(0); // { dg-error "no matching function" }
22 S2<X> s2; // { dg-error "use of deleted function" }
23 }