Debian Codegraph @

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

raw
1 // PR c++/116108
2 // { dg-do compile { target c++11 } }
3 template <class T>
4 struct S { const S s = 1; }; // { dg-error "field 's' has incomplete type 'const S<T>'" }
5 S t{2}; // { dg-error "invalid use of template-name 'S' without an argument list" "" { target c++14_down } }
6 // { dg-error "class template argument deduction failed" "" { target c++17 } .-1 }
7 // { dg-error "no matching function for call to 'S\\\(int\\\)'" "" { target c++17 } .-2 }