1 // PR c++/85731 2 // { dg-do compile { target c++11 } } 3 4 template <typename T> 5 struct Outer { 6 struct Inner; 7 template <int I> static void f(); 8 }; 9 10 template <typename T> 11 struct Outer<T>::Inner { 12 decltype(Outer<T>::f<42>()) f(); 13 }; 14 15 int main() { Outer<int>::Inner().f(); } 16