Created on 2007-04-01.00:00:00 last changed 172 months ago
Proposed resolution:
In [istream.formatted.arithmetic]/2 change the current as-if code fragment
typedef num_get<charT,istreambuf_iterator<charT,traits> > numget; iostate err = 0; long lval; use_facet<numget>(loc).get(*this, 0, *this, err, lval ); if (err == 0) {&&if (lval < numeric_limits<short>::min() || numeric_limits<short>::max() < lval))err = ios_base::failbit; else val = static_cast<short>(lval); } setstate(err);
Similarily in [istream.formatted.arithmetic]/3 change the current as-if fragment
typedef num_get<charT,istreambuf_iterator<charT,traits> > numget; iostate err = 0; long lval; use_facet<numget>(loc).get(*this, 0, *this, err, lval ); if (err == 0) {&&if (lval < numeric_limits<int>::min() || numeric_limits<int>::max() < lval))err = ios_base::failbit; else val = static_cast<int>(lval); } setstate(err);
To the more drastic changes of [istream.formatted.arithmetic] in the current draft N2134 belong the explicit description of the extraction of the types short and int in terms of as-if code fragments.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3362 |
2007-04-01 00:00:00 | admin | create |