From: Muck Jail (muckjail_at_[hidden])
Date: 2007-12-11 09:25:39
On Dec 11, 2007 7:51 AM, Jeff Garland <jeff_at_[hidden]> wrote:
> Michael Fawcett wrote:
> > On Dec 10, 2007 10:28 PM, Jeff Garland <jeff_at_[hidden]>
> >> Mark Van Dijk wrote:
> >>> The following code snippet produces an ASSERT on my machine running
> >>> WinXP (sp2) with VS8 (sp1) with boost v1.34.1:
> >>> boost::posix_time::time_duration t(24, 0, 0);
> >>> std::cout << t << std::end;
> >>> The assertion occurs because there is a check in the underlying CRT
> >>> verifies the hours portion is between 0 and 23 inclusive. Is this
> >>> something that might be fixed in boost 1.35?
> >> Well, I don't know what the problem is, but it isn't that the library
> >> restricts you to 24 hours. If you look in
> >> you'll see this test:
> >> time_duration tdl2(2000000, 0, 0, 0);
> >> check("2000000 hours", tdl2.hours() == 2000000);
> >> among others. And it clearly passes on VC8. So, I think you must have
> >> compilation problem or something else going on.
> > I can confirm that I have run into this issue as well. I can post a
> > code snippet from my work computer tomorrow.
> > My 'workaround' was to simply use 23 hours, 59 minutes, and 59
> > seconds, since we didn't require resolution greater than that, but it
> > was definitely annoying.
> So, why do the regression tests pass on all VC compilers....including the
> I don't know why the tests pass but the problem started with vs 2005.
> 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