Template reference parameter
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Mar 23 17:24:33 PDT 2015
On Mon, 23 Mar 2015 22:39:27 +0000, rumbu wrote:
> It's working, but I don't like the &value thing, ref would be better.
alas.
you can write a complex mixin that will generate the appropriate
templates for you, though, so you'll be able to do something like this:
mixin(MulticastDelegate!(`withRefInt`, `bool`, `char`, `ref int`));
but it will be error-prone and ugly. so the best thing is to stick with
pointers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150324/cdc20e9d/attachment.sig>
More information about the Digitalmars-d-learn
mailing list