Re: Mutable reference to const objects

2015-07-01 Thread Yuxuan Shui via Digitalmars-d-learn
On Wednesday, 1 July 2015 at 08:30:23 UTC, Yuxuan Shui wrote: How do I express a mutable reference to a const object in D? What I want to do is to define a variable, which refers a constant object, but I can change which constant object it is referring. Is this possible? I wonder will

Mutable reference to const objects

2015-07-01 Thread Yuxuan Shui via Digitalmars-d-learn
How do I express a mutable reference to a const object in D? What I want to do is to define a variable, which refers a constant object, but I can change which constant object it is referring. Is this possible?

Re: Mutable reference to const objects

2015-07-01 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 1 July 2015 at 08:33:44 UTC, Yuxuan Shui wrote: On Wednesday, 1 July 2015 at 08:30:23 UTC, Yuxuan Shui wrote: How do I express a mutable reference to a const object in D? What I want to do is to define a variable, which refers a constant object, but I can change which constant