
This has been mentioned from time to time and will eventually be changed. The original rationale was that in some platforms it was 64 bits which seemed wasteful for binary archives - that is 2 G Objects seemed enough. Now it seems that we'll really need a special type for collection count. In anycase, it can't be just changed without making obsolete existing archives - so its kind of a slow process. Robert Ramey Marcin Kalicinski wrote:
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
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost