Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!deb From: deb@svax.cs.cornell.edu (David Baraff) Newsgroups: comp.lang.c++ Subject: Lvalue checking for operator= ?? Message-ID: <33433@cornell.UUCP> Date: 21 Oct 89 20:17:21 GMT Sender: nobody@cornell.UUCP Reply-To: deb@svax.cs.cornell.edu (David Baraff) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 19 Suppose you have a standard matrix class, which implements '+', and also has its own assignment operator defined i.e. matrix &matrix::operator= (matrix &m) exists. Then, matrix a, b, c; ... a+b = c; appears to be legal. (As least it compiled under 1.2.) Is it legal under 2.0 ? What does it really mean? Shouldn't the '=' operator be forced to only accept an lvalue as its left-hand operand? David Baraff deb@svax.cs.cornell.edu