Subject: Re: [boost] What else shall I do before reuse a stringstream fordate parsing?
From: Bill David (billdavidcn_at_[hidden])
Date: 2009-02-16 21:16:11
It seems I should call both clear and str to get the right result.
2009/2/17 Bo Persson <bop_at_[hidden]>
> Bill David wrote:
> > 2009/2/16 Dmitry Goncharov <dgoncharov_at_[hidden]>
> >> You should invoke m_ss.seekg(ios_base::beg) before each parsing.
> >> Also, be careful with to_tm(). It is buggy. See
> >> https://svn.boost.org/trac/boost/ticket/1859
> > But after I do that, both invocations report "do not understand".
> > And why clear can't rewind it?
> The function clear doesn't "rewind" the stream, it just clears the
> flags, like eof. The old stream content is still there.
Thanks, I have tried. If I don't call clear, the fail status will impact
the later call to this logic.
> Bo Persson
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk