
Matthias Troyer wrote:
That's easy to answer: to achieve separation between archive format and serialization, which is, I believe what you advocate. Leave it to the archive to decide how to serialize sizes of collections - it could be different than serializing the integer type used for std::sized_t
I don't dispute this - it's just not clear how using std::size_t creates a problem.
size_t has problems with portable binary archives.
Well, lots of types have problems with portable binary archives. In anycase, using a strong_typedef would be fine with me. I believe that this is what you I believe that you want to use a BOOST_STRONG_TYPEDEF for this purpose and that sounds just fine to me. I still don't see why its needed but I haven't looked at the particular issues regarding collections in the depth that you have so I'm willing to take your word for the proposition that distinguishing it is a good thing. No downside and distinguishes this particular usage. Robert Ramey