1 // PR c++/85587 2 // { dg-do compile { target c++11 } } 3 4 template <int N> 5 struct S 6 { 7 enum class T 8 { 9 E, F 10 }; 11 void foo (); 12 }; 13 14 template <int N> foo()15 void S<N>::foo () 16 { 17 decltype (T::F) t; 18 } 19 20 void bar()21 bar () 22 { 23 S<0> s; 24 s.foo (); 25 } 26