OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / koenig5.C
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
6 namespace fu
7 {
8   template <class T>
9   struct bar
10   {
11       struct baz {};
12   };
13 }
14
15 namespace axe
16 {
17   struct handle {};
18   
19   template <class T>
20   char* f(T&);
21 }
22
23 namespace 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 }