
On 11/8/06 1:56 AM, "Ralf W. Grosse-Kunstleve" <rwgk@yahoo.com> wrote:
With the latest boost CVS, both VC 7.1 and VC 8.0 fail to compile
#include <boost/rational.hpp>
The error is shown below.
The problem is due to "unsigned long long" being the same as "unsigned __int64", which makes this code in boost/math/common_factor_rt.hpp fail:
#ifdef BOOST_HAS_LONG_LONG BOOST_PRIVATE_GCD_UF( unsigned long long ); #endif
#ifdef BOOST_HAS_MS_INT64 BOOST_PRIVATE_GCD_UF( unsigned __int64 ); #endif
As a quick workaround I tried:
#ifdef BOOST_HAS_LONG_LONG # if !defined(_MSC_VER) BOOST_PRIVATE_GCD_UF( unsigned long long ); # endif #endif
And a similar patch a few lines down (complete diff is below). This fixes the problem.
I used different solution. The <boost/cstdint.hpp> header sets up #defines so "(unsigned) long long" support and "(unsigned) __int64" support are mutually exclusive. I did the same.
I am sure this is not the final answer, but I'm uncertain which combinations of #if defined(...) is acceptable. Advice is highly appreciated. [TRUNCATE error message and fix patch]
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com