I've "gcc version 2.95.4 20011002 (Debian prerelease)", which might be just a Debian special for 2.95.3 i think, and it does complain like this only if i make this constructor explicit: boost::gregorian::date(const date_int_type& rhs) if i do not, it compiles well. Thx, Haubi Jeff Garland wrote:
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 _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Michael Haubenwallner SALOMON Automation GmbH Forschung & Entwicklung A-8114 Friesach bei Graz T +43 3127 200 308 F +43 3127 200 22 mailto:michael.haubenwallner@salomon.at http://www.salomon.at