
--- In Boost-Users@yahoogroups.com, "Jeff Garland" <jeff@c...> wrote:
This is probably an issue with the date_time configuration. Try changing the compile macros in boost/date_ti me/compiler_config.hpp so BOOST_NO_LONG_LONG_ABS is undefined. This is the relevant section of code:
//Work around compilers that don't have std::abs #if (defined(__GNUC__) && (__GNUC__ <= 3)) || (defined(BOOST_MSVC) && _MSC_VER <= 1200) || (defined(__BORLANDC__) && (__BORLANDC__
= 0x561)) # define BOOST_NO_LONG_LONG_ABS #endif
I've made the modification, boost.date_time compiled without any errors but the program still has errors. In particular it complains : boost\date_time\time_duration.hpp(61) : error C2784: '_Tp __cdecl _STL::abs(const struct _STL::complex<_Tp> &)' : could not deduce template argument for 'const struct _STL::complex<_Tp> &' from '__int64' boost\date_time\time_duration.hpp(60) : while compiling class-template member function 'long __thiscall boost::date_time::time_duration<class boost::posix_time::time_duration,class boost::date_time::time_res olution_traits<__int64,4,1000000,6,long> >::minutes(void) const' I've tried to include "cmath" in boost/date_time/time_duration.hpp... same error. Tried with "cstdlib" same error... I think i'm missing something... Luc.
Maybe STLPort is defining std::abs for 64 bit integers...
Jeff
-----Original Message----- From: acid_til <bluc@v...> [mailto:bluc@v...] Sent: Tuesday, February 04, 2003 8:20 AM To: Boost-Users@yahoogroups.com Subject: [Boost-Users] Incompatibilities between
Date_Time/PosixTime and
Boost.Python !?!?!?
Hi !!
When trying to compile a simple program (just a main and nothing in it) I get a lot of compile error... I'm using VC 6.0 SP5, STLport 4.5.3 and boost 1.29.
This is what I include in the program :
#include <iostream> #include <boost/python.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
Here are the error messages : boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'long double' or 'const struct _STL::complex<long double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'long double __cdecl _STL::abs(const struct _STL::complex<long double> &)' have different return types \boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'double' or 'const struct _STL::complex<double> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'double __cdecl _STL::abs(const struct _STL::complex<double> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs' boost\date_time\compiler_config.hpp(33) : error C2782: ' __cdecl _STL::abs()' : template parameter 'T' is ambiguous could be 'float' or 'const struct _STL::complex<float> &' boost\date_time\compiler_config.hpp(33) : error C2785: ' __cdecl _STL::abs()' and 'float __cdecl _STL::abs(const struct _STL::complex<float> &)' have different return types boost\date_time\compiler_config.hpp(30) : see declaration of 'abs'
Has this been reported ??? Are Boost.Python and posix_time incompatible ??? If not, can someone point to a solution.
Thanks a lot for your time.