"Jerry Quinn" wrote
> Steven Schveighoffer Wrote:
>> I was unaware you could even set a in the constructor.  I don't think
>> there's any general 'set once' type modifier.
>
> No, I didn't see one either.  In fact what I was asking for is not a set 
> once.  It's to allow a reference to a const object to be reassigned, since 
> it wasn't obvious to me that the reference itself should be kept const.

Oh, for this there is std.typecons.Rebindable:

Rebindable!(const(A)) a;

Not sure how close it is to the real thing, I haven't used it.

-Steve 


Reply via email to