On (24 Aug 97) Thomas Maeder wrote to Jerry Coffin...
TM> If the stream is a member of a constant object (of of an object whose
TM> const method is called), you are only allowed to call the const
TM> methods of the stream.
Unless the stream is declared as mutable, which it probably should be if
the situation you suggest might ever arise.
TM> But that's only an example. Declaring all methods const that don't
TM> modify the state of the object on which thy are applied is always
TM> worth the effort in the long run. What do you lose declaring them
TM> const? Nothing.
I'm not sure I agree. I think you lose clarity. Declaring a const
method for a class suggests that a const version of that class might be
useful. I'm hard put to think up much use for a stream if you can't
read or write it.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|