Debian Codegraph @

gcc/testsuite/g++.dg/parse/primary-expression-1.C

raw
1 // Copyright (C) 2002 Free Software Foundation
2 // Origin: C++/717
3 // Contributed by Gabriel Dos Reis <[email protected]
4 // { dg-do compile }
5
6 class _eAny
7 {
8 public:
9 _eAny(){}
10 };
11
12 template <class X>
13 class _eSeq
14 {
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 }
26 };
27
28
29 template <class X>
30 class _eHndl
31 {
32 public:
33 _eHndl(const _eAny *obj){}
34 };
35
36 class VarInstances : public _eAny
37 {
38 public:
39 VarInstances() : _eAny() {}
40 };
41
42 void testFunc(const VarInstances *testInstance)
43 {
44 const _eSeq<_eHndl<VarInstances> > temp1 =
45 _eSeq<_eHndl<VarInstances> >(_eHndl<VarInstances>(testInstance));
46
47 if((_eSeq<_eHndl<VarInstances>
48 >(_eHndl<VarInstances>(testInstance))._oPlusPlus(temp1)._oHash() ==
49 7))
50 {
51 return;
52 }
53 }
54
55 int main(int argc, char** argv)
56 {
57 testFunc(new VarInstances());
58 }