2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / wrap1.C
blob72f687efd14dfc13378bf1e32fee09626b0a0f1a
1 // { dg-do compile }
3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Michael Matz 03 Mar 2002 <matz@suse.de>
5 // instance of an actual pattern in 252.eon from SPEC2000
7 // The last Wrapper<char> once wasn't completed when applying '='.
9 template <class T>
10 class Wrapper {
11   public:
12     Wrapper (T& a);
13     Wrapper (const Wrapper<char>& ref);
16 template <class T>
17 class Element {
18 public:
19   T * operator[](int x);
22 void test()
24   char bla = 42;
25   Element< Wrapper <unsigned char> > elem;
26   elem[1][1] = Wrapper<char> (bla);