Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #310

Re: wrong description of effect 1 of basic_istream:: ignore

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-25 08:31 -0700
Organization A noiseless patient Spider
Message-ID <j5n3nn$f74$1@dont-email.me> (permalink)
References <j4g9af$2g0g$1@news2.ipartners.pl> <j59p64$ic0$1@dont-email.me> <j5kilg$2bb7$1@news2.ipartners.pl>

Show all headers | View raw


Am 25.09.2011 06:46, schrieb Krzysztof Żelechowski:
>  Daniel Krügler wrote:
>
>>    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 description intends to describe the observable behaviour of an
>  implementation in terms of logical assertions.  Logical assertions are not
>  "bullets" that can be "entered" but need not; they are predicates that can
>  evaluate to true or false.
>
>  The description contains two predicates, either of them causes extraction to
>  terminate.  In the incriminated case, the first predicate is evaluates to
>  true because its premise is false, therefore no characters will be
>  extracted.

Yes, you are correct, I misread your interpretation. I forwarded your
issue to the library group.

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 | NextPrevious in thread | Find similar


Thread

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