2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / friend46.C
blobb8695ccdaab7b2a8c3b5868e0fcc214b22251f56
1 // { dg-do assemble  }
2 // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 17 Nov 2000 <nathan@codesourcery.com>
5 // bug 43. Two failings, bison parser ickiness caused us to find the member
6 // named the same as a friend, and then when instantiating, we'd lookup in
7 // the wrong scope.
9 namespace X {
10   template <class T> class P;
11   
12   template <class T> void operator- (const P<T>&);
13   
14   template <class T>
15   struct V
16   {
17     V (const T&);
18   
19     void operator- ();
20     friend void X::operator-<> (const P<T>& a);
21   };
24 int main()
26   X::V<double> b(1.0);
28   return 0;