Should basic_*stream::is_open() be const?

Jonathan Wakely cow@compsoc.man.ac.uk
Fri Aug 13 17:04:00 GMT 2004


On Fri, Aug 13, 2004 at 05:42:10PM +0100, Chris Jefferson wrote:

> Surely a better idea would be to make every function const which can be 
> made const, because there is no reason not to?

Is the fact it won't compile on some standard-conforming compilers not
good enough reason?

Noone's arguing with const-correctness as a principle, just that if it's
not possible (due to mis-specified APIs in the standard) then it
shouldn't be followed dogmatically.

But it'll work with libstdc++ soon, and I'm supposed to be in the pub by
now, so I'm outta here

jon




More information about the Libstdc++ mailing list