|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-02-23 15:11:26
n.torrey.pines wrote:
> Hi
>
> Line 36 in collections_save_imp.hpp says:
>
> unsigned int count = s.size();
>
> I'm getting many pages of warnings in VC++2005 stemming from this
> line. Would it make sense to change that to
>
> std::size_t count = s.size() ?
No. size_t is a typedef. It could map to unsigned int on one version of the
compiler and to unsigned long on another. Saving something as an unsigned
int and loading it as an unsigned long is not guaranteed to work. By making
this change, you may be introducing a subtle forward compatibility issue
into your data files.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net