2 // P2615R1: Meaningful exports: Newly invalid declarations
3 // { dg-do compile { target c++11 } }
5 extern "C++" template <typename T> struct A {};
7 extern "C++" template <typename T> struct A<T*> {};
9 extern "C++" template <> struct A<int*> {};
10 // { dg-error "explicit specializations are not permitted here" "" { target c++20 } .-1 }
12 extern "C++" template struct A<int>;
13 // { dg-error "explicit instantiations are not permitted here" "" { target c++20 } .-1 }
16 // These should all still be valid, though
18 template <typename T> struct B {};
19 template <typename T> struct B<T*> {};
20 template <> struct B<int*> {};
21 template struct B<int>;