2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / inline3.C
bloba614100154aabcb418a6454cd1fad137c2367ecf
1 // { dg-do assemble  }
2 // { dg-options "-O3" }
3 // Origin: Mark Mitchell <mark@codesourcery.com>
5 class ostream;
7 struct S
9   virtual void print(ostream&) const = 0;
12 template <class _Tp>
13 class vector
15 public:
16   _Tp& operator[](unsigned __n) const { return *(_M_start + __n); }
17   _Tp* _M_start;
20 class T
22 public:
24   void print(ostream&) const;
26   vector<S*> bcList_m;
29 void T::print(ostream& o) const
31   int n = 3;
33   for (int i = 0; i < n; ++i)
34     bcList_m[i]->print(o);
35   return;
38 ostream&
39 operator<<(ostream& o, const T& bcList)
41   bcList.print(o);
42   return o;