1// { dg-do compile } 2// Contributed by David Abrahams <dave at boost-consulting dot com> 3// PR c++/14143: Koenig lookup should only look into template arguments only 4// if the argument is a template-id. 5 6namespace fu 7{ 8 template <class T> 9 struct bar 10 { 11 struct baz {}; 12 }; 13} 14 15namespace axe 16{ 17 struct handle {}; 18 19 template <class T> 20 char* f(T&); 21} 22 23namespace test 24{ 25 template <class T> 26 int f(T const&); 27 28 template <class T> 29 int g(T x) { return f(x); } 30 31 int x = g(fu::bar<axe::handle>::baz()); 32} 33