Debian Codegraph @

gcc/testsuite/g++.dg/template/permissive-error2.C

raw
1 // PR c++/116064
2 // { dg-additional-options -fpermissive }
3 // Verify we correctly mark a partial specialization as erroneous
4 // instead its primary template.
5
6 template<class T>
7 struct A { };
8
9 template<class T>
10 struct A<T*> { // { dg-error "instantiating erroneous template" }
11 void f(typename A::type); // { dg-warning "does not name a type" }
12 };
13
14 A<int> a; // { dg-bogus "" }
15 A<int*> b; // { dg-message "required from here" }