[Prev][Next][Index]
operator= parse error
- From: aba@atlas.ex.ac.uk
- Date: Thu, 1 Sep 94 11:24:08 +0100
- To: sage-bugs@cica.indiana.edu
- Subject: operator= parse error
pC++2dep fails to parse the following program:
-------------------------------8<--------------------------------
class test {
public:
test& operator=(test& t) { return t; }
};
int main() {
test a, b;
a = b;
a.operator=(b);
}
-------------------------------8<--------------------------------
Error on line 10 of test4.cc: parse error
Yet CC (cfront 3.0.1) and g++-2.6.0 compile it with no problems.
The problem seems to be in accepting the call to the overloaded
assignment operator test::operator=.
(I am using the pc++sage++-1.3 distribution).
Adam
_______________________________________________________________
email:aba@dcs.exeter.ac.uk http://dcs.exeter.ac.uk/~aba/