Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2006-11-10 18:19:44


On 11/8/06 1:56 AM, "Ralf W. Grosse-Kunstleve" <rwgk_at_[hidden]> 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk