Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-28 16:53:54


Jeff Garland wrote:
> On Sat, 28 May 2005 10:05:15 -0700, Robert Ramey wrote

[...]

>> I don't see this change as "breaking code" but rather detecting code
>> that is very likely already broken.
>>
>> So, as I said, its not that I'm unsympathetic to your point of view,
>> I just don't think everyone is sympathetic to mine.
>
> Well, I'd say that 'no one' is sympathetic to yours, yet ;-) I don't
> think that Vladimir, myself, or the others that have posted on this
> topic are convinced that this change is really going to prevent
> people from making the error you are concerned about. OTOH, we can
> all see that much perfectly working user code will now not compile
> and that in common use cases people will start 'hacking' their code
> with casts or other work arounds b/c they want to serialize non-const
> data. And while the interface might have been documented during the
> review it's clear none of us understood the implications -- we wrote
> code and when it worked we presumed that since it worked we
> understood the interface...

The "const enforcement" is consistent with the spirit of the serialization
library, which is identity-based. My own opinion is that a serialization
library should be value-based, but that's a different story. I'm just
pointing out where the const rule comes from.


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