Read only delegate
Rene Zwanenburg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 4 04:32:23 PDT 2016
On Monday, 4 April 2016 at 08:10:10 UTC, Edwin van Leeuwen wrote:
> Is there a way to make sure a delegate only reads state,
> without changing it? I tried annotating the delegate as const,
> but that does not seem to work.
> ```
Yeah this is a nasty old issue. The underlying problem is that a
delegate's function and context pointers are completely untyped.
https://issues.dlang.org/show_bug.cgi?id=1983
More information about the Digitalmars-d-learn
mailing list