Logical const
Peter Alexander
peter.alexander.au at gmail.com
Sun Nov 28 11:09:13 PST 2010
On 28/11/10 4:37 PM, Andrei Alexandrescu wrote:
> The library solution to logical constness would gravitate around a union
> with a const (or immutable) and a regular field of the same type:
>
> union {
> T before;
> const T after;
> }
>
>
> Andrei
I must be missing something. Surely, when inside a const method, you
still can't modify a union, whether you access a const member of the
union or not?
Could you elaborate?
More information about the Digitalmars-d
mailing list