Chris Nicholson-Sauls wrote:

Isn't that what opDispatch does now?

-Lars

Not as a static member, to my knowledge. At the very least, I see no mention of static forwarding in the docs: http://www.digitalmars.com/d/2.0/operatoroverloading.html#Dispatch

The fact that the name of the non-existent function arrives as a template parameter indicates that it is static dispatch.

Which made me realize that it can be overloaded:

void opDispatch(string name : "special_member_function_name", T)(T parameter)
{
    // special implementation for "special_member_function_name"
}

Ali

Reply via email to