Const correctness in input/output libraries

N

nvitacolonna

I have found this page:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1360.htm

identifying const-correctness inconsistencies in the input/output
standard libraries (e.g., tellg() not being declared const). I was
just wondering: what is the current opinion of the standard committee
about such issue? Is that going to be taken into account for the new
standard? (I admit that I was a bit surprised when I discovered that
is_open() and tellg() are not const).

Nicola
 
E

Erik Wikström

I have found this page:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1360.htm

identifying const-correctness inconsistencies in the input/output
standard libraries (e.g., tellg() not being declared const). I was
just wondering: what is the current opinion of the standard committee
about such issue? Is that going to be taken into account for the new
standard? (I admit that I was a bit surprised when I discovered that
is_open() and tellg() are not const).

I can not speak for the standards committee but a quick check shows that
those functions are still not const in the current working draft. I can
see two reasons for this, the first being that since the proposal was
made before they started working on the new version it was forgotten.
The other alternative is that the proposal was considered but for some
reason it was rejected (perhaps it would break too much existing code?).
You can try asking asking in comp.std.c++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top