1 // P0634R3 2 // { dg-do compile { target c++2a } } 3 4 template<class T> f(int i)5void f(int i) 6 { 7 T::x * i; // { dg-error "dependent-name" } 8 } 9 10 struct Foo { 11 typedef int x; 12 }; 13 14 struct Bar { 15 static int const x = 5; 16 }; 17 18 int main()19main () 20 { 21 f<Bar>(1); 22 f<Foo>(1); 23 } 24