Created on 2007-06-22.00:00:00 last changed 184 months ago
Proposed resolution:
Add a new paragraph immediately above p4 of [ext.manip] with the following text:
Effects: The expression
in >> get_money(mon, intl)described below behaves as a formatted input function (as described in [istream.formatted.reqmts]).
Also change p4 of [ext.manip] as follows:
Returns: An object
sof unspecified type such that ifinis an object of typebasic_istream<charT, traits>then the expressionin >> get_money(mon, intl)behaves as a formatted input function that callsf(in, mon, intl)were called. The functionfcan be defined as...
In a private email Bill Plauger notes:
I believe that the function that implements
get_money[from N2072] should behave as a formatted input function, and the function that implementsput_moneyshould behave as a formatted output function. This has implications regarding the skipping of whitespace and the handling of errors, among other things.The words don't say that right now and I'm far from convinced that such a change is editorial.
Martin's response:
I agree that the manipulators should handle exceptions the same way as formatted I/O functions do. The text in N2072 assumes so but the Returns clause explicitly omits exception handling for the sake of brevity. The spec should be clarified to that effect.
As for dealing with whitespace, I also agree it would make sense for the extractors and inserters involving the new manipulators to treat it the same way as formatted I/O.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-10-21 18:28:33 | admin | set | messages: + msg3455 |
| 2007-06-22 00:00:00 | admin | create | |