Index: boost/archive/basic_binary_oprimitive.hpp =================================================================== --- boost/archive/basic_binary_oprimitive.hpp (revision 58291) +++ boost/archive/basic_binary_oprimitive.hpp (working copy) @@ -160,7 +160,7 @@ // figure number of elements to output - round up count = ( count + sizeof(Elem) - 1) / sizeof(Elem); - assert(count <= boost::integer_traits::const_max); + assert(count <= std::size_t(boost::integer_traits::const_max)); std::streamsize scount = m_sb.sputn( static_cast(address), static_cast(count) Index: boost/archive/basic_binary_iprimitive.hpp =================================================================== --- boost/archive/basic_binary_iprimitive.hpp (revision 58291) +++ boost/archive/basic_binary_iprimitive.hpp (working copy) @@ -151,7 +151,7 @@ std::size_t count ){ // note: an optimizer should eliminate the following for char files - assert(count / sizeof(Elem) <= boost::integer_traits::const_max); + assert(static_cast(count / sizeof(Elem)) <= boost::integer_traits::const_max); std::streamsize s = static_cast(count / sizeof(Elem)); std::streamsize scount = m_sb.sgetn( static_cast(address),