Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Daniel Krügler<daniel.kruegler@googlemail.com> |
|---|---|
| Newsgroups | comp.std.c++ |
| Subject | Re: wrong description of effect 1 of basic_istream:: ignore |
| Date | 2011-09-20 10:11 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <j59p64$ic0$1@dont-email.me> (permalink) |
| References | <j4g9af$2g0g$1@news2.ipartners.pl> |
Am 11.09.2011 18:12, schrieb Krzysztof Żelechowski:
> [istream.unformatted] in N3242 currently has the following to say about the
> semantics of basic_istream:: ignore:
>
> Characters are extracted until any of the following occurs:
> — if n != numeric_limits<streamsize>::max() (18.3.2), n characters are
> extracted
>
> This statement, apart from being slightly ungrammatical, indicates that if
> (n == numeric_limits< streamsize>:: max ()), the method returns without
> extracting any characters.
I tend to disagree in regard to your argumentation chain. If we have the
situation "n == numeric_limits<streamsize>::max()", the first bullet can
never be entered (because it simply does not occur) but the initiating
assertion ("Characters are extracted until any of the following occurs")
still holds. Therefore, in this case the stop condition for character
extraction can only be one of bullet two or bullet three.
> The intended semantics would be described by the following statement:
>
> — (n != numeric_limits< streamsize>:: max ()) (18.3.2) and (n) characters
> have been extracted so far.
I agree that this would be an editorially improved way of describing the
same thing, but I doubt that the intent could be really misunderstood.
Do you have an example for an implementation that does this wrong based
on your (or any other) interpretation? In this case I would first start
with a bug report and if still disagreement exists on this topic I
suggest to bring this issue forward again.
Thanks& Greetings from Bremen,
Daniel Krügler
--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
wrong description of effect 1 of basic_istream:: ignore Krzysztof Żelechowski<giecrilj@stegny.2a.pl> - 2011-09-11 09:12 -0700
Re: wrong description of effect 1 of basic_istream:: ignore Daniel Krügler<daniel.kruegler@googlemail.com> - 2011-09-20 10:11 -0700
Re: wrong description of effect 1 of basic_istream:: ignore Krzysztof Żelechowski<giecrilj@stegny.2a.pl> - 2011-09-24 21:46 -0700
Re: wrong description of effect 1 of basic_istream:: ignore Daniel Krügler<daniel.kruegler@googlemail.com> - 2011-09-25 08:31 -0700
csiph-web