Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-10-09 15:16:25


"Jose" <jmalv04_at_[hidden]> wrote

> ===========================================
>
> g++ -O6 arkadiy.cpp -o test2 -Irtl -I/usr/local/include/boost-1_33
> -L/usr/local/lib
> rtl/identifiable.hpp: In member function 'unsigned int
> rel::identifiable::id() const':
> rtl/identifiable.hpp:22: error: cast from 'char*' to 'unsigned int' loses
> precision
> make: *** [test2] Error 1
> ===========================================

This actually is just a warning in VC7, and never came up in MinGW, so I
didn't pay much attention to it. But why wouldn't it be able to cast, is it
a 32 or 64-bit system?

Could you modify your copy of identifiable.hpp, and replace:

    return reinterpret_cast<unsigned int>(p.get());

with

    return p.get() - (char*)0;

This may fix the problem (at least it removes the warning in vc71).

Regards,
Arkadiy

PS: my results for RTL (MinGW with optimization) --3094ms. My PC has a 1.5
GHz processor.


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