Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-09-15 16:26:24


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,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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