[Issue 5710] cannot use delegates as parameters to non-global template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 6 16:59:12 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5710



--- Comment #20 from Steven Schveighoffer <schveiguy at yahoo.com> 2013-05-06 16:59:08 PDT ---
(In reply to comment #19)

> How the parameters are actually passed is fairly irrelevant, the main problem
> which needs to be solved is how to store two context pointers in a delegate,

If you look closely at the original example, no delegates are used.  add is
passed by alias, not by delegate.  But I see the point, if you took
&foo.doStuff!add, you would be screwed.

What about Rainer's idea?  This would require less memory consumption from the
stack.

Anyone consider that this is no longer the case (in any valid solution so far)?

auto dg = &foo.doStuff!add;
assert(foo !is dg.ptr);

Don't know if that's an unbreakable rule though...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list