This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Silently passing wrong input for good one


Martin Sebor wrote:

> Paolo Carlini wrote:
> [...]
>
>> But then we have a defect in the standard, because according to the
>> standard Stage2 goes ahead according to the grammar, on input_iterators,
>> and only at the end, Stage 3 kicks in with the role of scanf...
>
> Maybe you and I can work on new wording for stage 2 in Berlin? ;-)
> (I promised to provide wording for issue 23 long time ago, so this
> might be a good opportunity for me to make good on it.)

Definitely! Really, as long as we have such kind of wording, on
input_iterators, I don't see how you can avoid for the iterator to
advance past 'e' and past '-' during Stage2: of course, because
otherwise you wouldn't be able to parse a well-formed scientific number.

Actually, I'm not sure about the best way to fix the standard :( Maybe,
as you suggested, we can fix it for a specialization to pointers... I'm
afraid that as long as general input iterators are mentioned it's hard
to make progress.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]