Boost logo

Boost Users :

From: Konstantin M. Litvinenko (yg-boost-users_at_[hidden])
Date: 2003-04-11 05:27:33


Hello, All!

#include <boost/date_time/posix_time/posix_time.hpp>
#include <iostream>

int main()
{
 using namespace boost::posix_time;
 using namespace boost::gregorian;

 date d(1990,1,1);
 ptime t(d);

 std::cout << to_simple_string(t);

 return 0;
}

    I have tested this sample under 4 compilers - vc7, gcc 2.96 asplinux,
builder 5.6.4 and kylix3 (compiler borland 5.6). Under Kylix it produce
floating point error. I figure out that this happens because t, after this
line

     ptime t(date(1990,1,1));

    have {0} (as i see in debuger).

    Is this library or kylix bug? It seems to be a __int64 arithmetic error
but i am not sure.

With best regards, Konstantin M. Litvinenko aka Dark Angel. E-mail:
darkangel_at_[hidden]


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