Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!mit-eddie!mit-amt!peter From: peter@mit-amt.MEDIA.MIT.EDU (Peter Schroeder) Newsgroups: comp.lang.c++ Subject: Re: Lvalue checking for operator= ?? Summary: how to specify *this as const? Message-ID: <874@mit-amt.MEDIA.MIT.EDU> Date: 24 Oct 89 01:58:27 GMT References: <33433@cornell.UUCP> <10045@alice.UUCP> Organization: MIT Media Lab, Cambridge, MA Lines: 19 In article <10045@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >In article <33433@cornell.UUCP>, deb@svax.cs.cornell.edu (David Baraff) writes: >How about making operator+ return a const matrix? >Then you won't be able to assign to it. > > [...] >on behalf of a const object (well, 2.0 will let you get away with >it but will give a warning). I think that's almost exactly >what you want. > --Andrew Koenig Which brings up an interesting point. How do I tell the compiler that `*this' is const with respect to some operation? After all that is really what I need in the above case?! Peter peter@media-lab.media.mit.edu