The following simple code doesn't compile:
----------------------------------------------
#define DATE_TIME_INLINE
#include
#include
using namespace boost;
using namespace boost::posix_time;
using namespace boost::gregorian;
...
time_period p(ptime(date(2003, 03, 25)), ptime(date(2003, 04,
25)));
date_duration duration(days(1));
p.shift(duration);
----------------------------------------------------
the compiler (VC++ 7.0) gives the following:
error C2664: 'boost::date_time::period::shift' : cannot convert parameter
1 from 'boost::gregorian::date_duration' to 'const
boost::posix_time::time_duration &'
Reason: cannot convert from 'boost::gregorian::date_duration'
to 'const boost::posix_time::time_duration'
No constructor could take the source type, or constructor
overload resolution was ambiguous
I think this should work out of the box, since I've been doing lots
of other things with date_time and they work fine.
Any ideas?
Thanks in advance,
Alex