Topic: 27.6.1.3 - Unformatted input functions
Author: sebor@my-deja.com
Date: 1999/09/14 Raw View
Hi,
according to 27.6.1.3, p1, "Each unformatted input function begins
execution by constructing an object of class sentry..."
I wonder whether this applies to *all* functions listed in this section,
including gcount(), peek(), putback(), unget(), and seekg(). It
definitely doesn't seem to make much sense in the case of gcount() since
the function is const and sentry may modify the stream passed to it.
If not, I believe the Standard should be clear on the classification of
these functions to prevent incompatibilities between implementations.
Thanks
Martin
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Matt Austern <austern@sgi.com>
Date: 1999/09/14 Raw View
sebor@my-deja.com writes:
> Hi,
>
> according to 27.6.1.3, p1, "Each unformatted input function begins
> execution by constructing an object of class sentry..."
>
> I wonder whether this applies to *all* functions listed in this section,
> including gcount(), peek(), putback(), unget(), and seekg(). It
> definitely doesn't seem to make much sense in the case of gcount() since
> the function is const and sentry may modify the stream passed to it.
> If not, I believe the Standard should be clear on the classification of
> these functions to prevent incompatibilities between implementations.
I agree that it's not clear which functions that paragraph applies to.
The library working group is aware of the problem; it's an open issue.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]