Created on 2009-12-25.00:00:00 last changed 161 months ago
Proposed resolution:
Change [ext.manip] p8:
template <class charT, class traits> void f(basic_ios<charT, traits>& str, struct tm* tmb, const charT* fmt) { typedef istreambuf_iterator<charT, traits> Iter; typedef time_get<charT, Iter> TimeGet; ios_base::iostate err = ios_base::goodbit; const TimeGet& tg = use_facet<TimeGet>(str.getloc()); tgm.get(Iter(str.rdbuf()), Iter(), str, err, tmb, fmt, fmt + traits::length(fmt)); if (err != ios_base::goodbit) str.setstate(err): }
[ 2010-01-14 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
Extended Manipulators [ext.manip] p8 defines the semantics of get_time in terms of a function f.
template <class charT, class traits> void f(basic_ios<charT, traits>& str, struct tm* tmb, const charT* fmt) { typedef istreambuf_iterator<charT, traits> Iter; typedef time_get<charT, Iter> TimeGet; ios_base::iostate err = ios_base::goodbit; const TimeGet& tg = use_facet<TimeGet>(str.getloc()); tm.get(Iter(str.rdbuf()), Iter(), str, err, tmb, fmt, fmt + traits::length(fmt)); if (err != ios_base::goodbit) str.setstate(err): }
Note the call to tm.get. This is clearly an error, as tm is a type and not an object. I believe this should be tg.get, rather than tm, but this is not my area of expertise.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg1496 |
2010-10-21 18:28:33 | admin | set | messages: + msg1495 |
2009-12-25 00:00:00 | admin | create |