TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: THOMAS MAEDER
from: JERRY COFFIN
date: 1997-08-28 16:53:00
subject: fstream identifying mode

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.