On Mon, 17 Nov 2003 10:10:12 -0700, Jeff Garland wrote
On Mon, 17 Nov 2003 16:23:14 +0100, Michael Haubenwallner wrote
Hi,
I'm preparing my company's step from C to C++, and when i use boost::date_time::*, there's a great danger to make mistakes like this with boost-1.30.2: ...code snipped... What do you think about this ?
Jeff Garland replied: I'll look into it. On first blush this would probably be reasonable.
Only thing is when I compile your code (after some modifications for b/c of namespace std usage) on the current CVS I get: test2.cpp: In function `int main()': test2.cpp:14: no matching function for call to `boost::posix_time::ptime::ptime(time_t&)' /home/jeff/devTools/boost_cvs/boost/date_time/posix_time/ptime.hpp:28: candidates are: boost::posix_time::ptime::ptime(const boost::posix_time::ptime&) /home/jeff/devTools/boost_cvs/boost/date_time/posix_time/ptime.hpp:41: boost::posix_time::ptime::ptime(const boost::posix_time::int64_time_rep&) /home/jeff/devTools/boost_cvs/boost/date_time/posix_time/ptime.hpp:38: boost::posix_time::ptime::ptime(boost::gregorian::date) /home/jeff/devTools/boost_cvs/boost/date_time/posix_time/ptime.hpp:35: boost::posix_time::ptime::ptime(boost::gregorian::date, boost::posix_time::time_duration) So which compiler is doing this conversion for you? Jeff