Le 27/12/2011 18:03, Peter Alexander a écrit :
On 27/12/11 4:32 PM, deadalnix wrote:
Le 27/12/2011 16:09, Andrei Alexandrescu a écrit :
On 12/27/11 5:27 AM, kenji hara wrote:
I've already posted a dmd patch to fix all of opDispatch problems:

https://github.com/D-Programming-Language/dmd/pull/280

As far a I understand you pass the whole template as a string inside
opDispatch? For example, say obj defines opDispatch:

obj.foo!(bar, baz)(a, b);

Would that be rewritten as

obj.opDispatch!("foo!(bar, baz)")(a, b);

?

That would be great.


I think a variadoic template is a better option because of scope issues.
You may not know anymore what is bar or baz within opDispatch.

How would that work? opDispatch already has variadic templates for the
normal function parameters. Make opDispatch a template inside a template?

You are right, that was stupid of me.

I'm afraid that something like the template inside a template is something we should consider. Or passing templates arguements as a Tuple to opDispatch.

Reply via email to