OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / cvt21.C
1 // Build don't link: 
2 // GROUPS passed conversions
3 // cvt file
4 // Message-Id: <9307200528.AA02094@legolas>
5 // From: Mark Kuzmycz <kuzmycz@deakin.edu.au>
6 // Subject: int & conversion operator
7 // Date: Tue, 20 Jul 93 15:28:47 EST
8
9 class Int
10 {
11         public:
12                 Int(void);
13                 Int(int);
14                 Int(const Int&);
15         
16                 Int* copy(void) const;
17                 
18                 operator int&();
19                 
20                 Int& operator ++(void);
21                 Int& operator --(void);
22                 
23         private:
24                 int value;
25 };
26  
27 main()
28 {
29   Int data = 2;
30   Int test;
31
32   test = data * 12;
33   data += 1;
34 }
35
36 // UNKNOWN "FAIL"