It's worse than I thought

Craig Black cblack at ara.com
Fri Nov 30 09:19:27 PST 2007


>> (4) let "const(C)&" be the syntax for making mutable references to
>> const classes.
>
> I don't think adding an amphersand makes it any more understandable.
>

Maybe const(ref) could be used just like const(this).

const X x;  // The reference is mutable
const(ref) X x;  // The data is mutable
const(ref) const X x;  // Nothing is mutable 





More information about the Digitalmars-d mailing list