Boost logo

Boost :

From: Marcin Kalicinski (kalita_at_[hidden])
Date: 2006-02-08 13:49:13


File collections_save_imp.hpp uses unsigned int to represent number of
elements in STL container. Shouldn't this be replaced with "typename
Container::size_type" (or at least with size_t) to be more portable? At
least it would stop annoying warning from MSVC.

The part of file that is relevant:

template<class Archive, class Container>
inline void save_collection(Archive & ar, const Container &s)
{
  // record number of elements
  unsigned int count = s.size(); // <-- here and also below
  ar << make_nvp("count", const_cast<const unsigned int &>(count));

/* ...truncated... */

Best regards,
Marcin


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