OSDN Git Service

* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / friend46.C
1 // Build don't link:
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 17 Nov 2000 <nathan@codesourcery.com>
4
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.
8
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 operator-<> (const P<T>& a);
21   };
22 }
23
24 int main()
25 {
26   X::V<double> b(1.0);
27
28   return 0;
29 }