Pure delegate not quite pure?
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 30 14:31:26 PDT 2015
On 6/30/15 5:23 PM, Tofu Ninja wrote:
> On Sunday, 28 June 2015 at 10:19:05 UTC, anonymous wrote:
>> [...]
>
> Is there any way to annotate the context as const?
const x = 4 ;)
But even if you could annotate just the *reference* as const, it doesn't
stop foo from changing it as you did in the example.
-Steve
More information about the Digitalmars-d-learn
mailing list