1 // PR c++/58599 2 // { dg-do compile { target c++11 } } 3 4 template<int> struct A1; 5 6 template<> struct A1<0> 7 { 8 template<typename, typename...> struct B1 9 { 10 template<typename> int foo1() { return 0; } 11 12 int i1 = foo1<int>(); 13 }; 14 }; 15 16 template<int> struct A2; 17 18 template<> struct A2<0> 19 { 20 template<typename, typename> struct B2 21 { 22 template<typename> int foo2() { return 1; } 23 24 int i2 = foo2<int>(); 25 }; 26 }; 27 28 template<int> struct A3; 29 30 template<> struct A3<0> 31 { 32 template<typename> struct B3 33 { 34 template<typename> int foo3() { return 2; } 35 36 int i3 = foo3<int>(); 37 }; 38 }; 39