| 1 |
// { dg-do assemble } |
| 2 |
|
| 3 |
// According to the non-normative example in |
| 4 |
// [temp.class.spec.mfunc]/2, these should be valid, but the grammar |
| 5 |
// in the Standard does not allow partial nor full specializations as |
| 6 |
// member-declarations, so we'd better not support them. |
| 7 |
|
| 8 |
template <class T> |
| 9 |
struct S { |
| 10 |
template <class U> void f(U); |
| 11 |
template <> void f<int>(int); // { dg-error "20:template-id .f<int>. in declaration|explicit specialization" } |
| 12 |
|
| 13 |
template <class V> struct I {}; |
| 14 |
template <class V> struct I<V*> {}; |
| 15 |
|
| 16 |
template <> struct I<int>; // { dg-error "" } invalid specialization |
| 17 |
}; |