2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / template10.C
blob196ea34b7f7cd752f9d5964961e25f22eb86da88
1 // { dg-do assemble  }
2 // Bug: member operator shadows global template in tsubst.
4 class ostream;
6 template <class TP> class smanip;
8 template<class TP>
9 ostream& operator<<(ostream& o, const smanip<TP>& m);
11 template <class TP> class smanip {
12 public:
13   friend ostream& operator<< <>(ostream &o, const smanip<TP>&m);
16 template<class TP>
17 ostream& operator<<(ostream& o, const smanip<TP>& m)
18 { return o;}
20 class X
22 public:
23   X operator<<(int);  // commenting out this line makes it work!
24   void print(ostream& os);
27 void X::print(ostream& os)
29   smanip<double> smd;
30   os << smd;                    // { dg-bogus "" }