Subject: Re: [boost] [serialization] basic_binary_oarchive.hpp asserts are no longer necessary
From: Number Cruncher (number.cruncher_at_[hidden])
Date: 2010-02-04 04:22:57
On 03/02/10 16:46, Robert Ramey wrote:
> I don't see the asserts as redundant. Suppose that one actually
> uses 32K classes in his program. The program would fail.
> Of course this is unlikely, but someone could change the type
> of version type, or int_least16_t could be implemented
> wrong on some platform or who knows what. If the
> only issue is the warnings, then a cast inside the assertion
> would be a better solution. Or maybe using
> boost::integer_traits<version_type>::const_max - but
> I don't think that would work. Feel free to make a
> track item on this.
Fair point. I've amended the patch to check that "t.t" is *less* than
the maximum permissible, i.e. we assert if someone gets up to the limit,
rather than right on it. This silences GCC for me and is more in keeping
with the original spirit of the asserts.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk