// { dg-do run } // { dg-options "-ansi -pedantic-errors -w" } struct S { template struct Y { template void foo(T t); }; }; template <> template <> void S::Y::foo(int i) { } int main() { S::Y s; s.foo(3.0); }