473,394 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Const correctness in input/output libraries

I have found this page:

http://www.open-std.org/jtc1/sc22/wg...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
Jan 21 '08 #1
1 1630
On 2008-01-21 12:00, nv**********@gmail.com wrote:
I have found this page:

http://www.open-std.org/jtc1/sc22/wg...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++.

--
Erik Wikström
Jan 21 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bolin | last post by:
Hi all, A question about smart pointers of constant objects. The problem is to convert from Ptr<T> to Ptr<const T>. I have look up and seen some answers to this question, but I guess I am too...
14
by: mandydhaliwal | last post by:
Hi Guys, I was going through a product's source code. They never use const function arguments with default value. for instance Never noticed following type of declaration foo ( const int...
16
by: hzmonte | last post by:
Correct me if I am wrong, declaring formal parameters of functions as const, if they should not be/is not changed, has 2 benefits; 1. It tells the program that calls this function that the...
13
by: asm23 | last post by:
Hi,I need some help to clarify the warning "initial value of reference to non-const must be an lvalue". I'm searching in this groups to find someone has the same situation like me. I found in...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.