Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/class-deduction67.C

raw
1 // Deduction from inherited constructors isn't supported before C++23.
2
3 //{ dg-do compile { target c++17 } }
4
5 template <class T> struct A
6 {
7 A(T);
8 };
9
10 template <class T> struct B: A<T>
11 {
12 using A<T>::A;
13 };
14
15 int main()
16 {
17 B b = 42; // { dg-line init }
18 // { dg-prune-output "no matching function" }
19 // { dg-error "class template argument deduction" "" { target c++20_down } init }
20 }