Why do "const inout" and "const inout shared" exist?
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 1 20:13:46 PDT 2017
On 7/1/2017 3:12 PM, Timon Gehr wrote:
> const(const(T)) = const(T)
> const(immutable(T)) = immutable(T)
> const(inout(T)) = ?
>
> It used to be the case that const(inout(T)) = const(T), but this is wrong,
> because if we replace 'inout' by 'immutable', the result should be immutable(T),
> not const(T). Hence const(inout(T)) cannot be reduced further.
If const(inout(T)) is reduced to inout(T), it works.
More information about the Digitalmars-d
mailing list