Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-09-16 04:50:48


"JOAQUIN LOPEZ MU?Z" wrote:
> The recently included lines 136-137 of boost/type_traits/
> is_base_and_derived.hpp:
>
> BOOST_STATIC_ASSERT(sizeof(B));
> BOOST_STATIC_ASSERT(sizeof(D));
>
> make MSVC 8.0 emit the following warning:
> c:\...\boost\type_traits\is_base_and_derived.hpp(137) :
> warning C4800: 'size_t' : forcing value to bool 'true' or
> 'false' (performance warning)
> [same for line 138]
>
> Changing the assert conditions to
>
> BOOST_STATIC_ASSERT(sizeof(B)!=0);
> BOOST_STATIC_ASSERT(sizeof(D)!=0);
>
> shuts the compiler up. HTH,

Thanks, fixed in SVN, John.


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