On Thu, 03 Jul 2014 15:09:03 GMT, Yuriy wrote:

That's great, although looks hacky. Can't wait to see it working for REST.

I think the right solution would rather be to change how D handles protection attributes w.r.t alias template parameters. Currently the protection is checked when the alias is accessed, but it would arguable make a lot or more sense instead to do that check where the template is instantiated.

Then there would only be a second issue (I think), and that is that there seems to be no way to directly invoke a member function alias on a specific this instance other than calling it from within another member function of that instance.

So currently using a proxy method is really the only way to make this work AFAIK.