2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / primary-expression-1.C
blob931ecd88a2f95b1b7a15b381fae1722166affa76
1 // Copyright (C) 2002 Free Software Foundation
2 // Origin: C++/717
3 // Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net
4 // { dg-do compile }
6 class _eAny
8 public:
9    _eAny(){}
12 template <class X>
13 class _eSeq
15 public:
16    _eSeq(const X thing){}
17    int _oHash() {return 0;}
18    _eSeq<X > _oPlusPlus(const _eSeq<X > other) const
19    {
20       return *this;
21    }
22    _eSeq<X > take(const _eSeq<X > other) const
23    {
24       return *this;
25    }
29 template <class X>
30 class _eHndl
32 public:
33    _eHndl(const _eAny *obj){}
36 class VarInstances : public _eAny
38 public:
39    VarInstances() : _eAny() {}
42 void testFunc(const VarInstances *testInstance)
44    const _eSeq<_eHndl<VarInstances> > temp1 =
45       _eSeq<_eHndl<VarInstances> >(_eHndl<VarInstances>(testInstance));
47    if((_eSeq<_eHndl<VarInstances>
48        >(_eHndl<VarInstances>(testInstance))._oPlusPlus(temp1)._oHash() ==
49        7))
50       {
51          return;
52       }
55 int main(int argc, char** argv)
57    testFunc(new VarInstances());