Boost logo

Boost Users :

Subject: Re: [Boost-users] date-time library and checked iterators 2
From: gast128 (gast128_at_[hidden])
Date: 2009-01-29 05:22:51


Roland Bock <rbock <at> eudoxos.de> writes:

>
> > Code compiles but gives a runtime error (through the checked iterators):
> >
> > // use time_put facet to create final string
> > return std::use_facet<std::time_put<CharT> >(a_ios.getloc()).put
(next,
> > a_ios,
> >
fill_char,
> > &tm_value,
> > &*a_format.begin(),
> > &*a_format.begin()+a_format.size());
>
> ok, sorry, should have been more specific there: Could you send a short
> but "complete" sample which compiles but crashes? It should contain a
> main function which does serves only one purpose: Demonstrate the
> problem in as little code as possible (but as much as necessary to
> actually be able to create a program from it).
>
> Something like this would be useful to attach to a bug report, too.

I already understood that the first time. However it takes me some time to
peal of the unnessary parts to create a test case, since it happens during
streaming of a date time when a facet is set. However from the Date.Time code
one can clearly see that it is incorrect. This is only allowed if the
specifications explicitly state that the format string may not be empty.
 
> Filing a bug report should work (never had a problem), starting from here:
>
> http://www.boost.org/support/bugs.html

I got an error about an invalid certificate, but maybe I will give it a try.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net