Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2008-06-06 07:42:18

The trunk version of portable_binary_iarchive.hpp has the following at
line 98:

     // default fall through for any types not specified here
     template<class T>
     void load(T & t){
         boost::intmax_t l;
         load_impl(l, sizeof(T));
         // use cast to avoid compile time warning
         t = static_cast<T>(l);

On msvc 8 I get the following warning:

: warning C4800: 'boost::intmax_t' : forcing value to bool 'true' or
'false' (performance warning)

The comment on this function implies that there are specializations
somewhere. Would it make sense to have a void load<bool> specialization

        t = l? true : false;

Thanks, Jeff

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at