On 5/3/15 4:20 PM, Meta wrote:
On Sunday, 3 May 2015 at 20:25:45 UTC, Andrei Alexandrescu wrote:
OK, here's what I have now - two templates that are self contained and
work well:
The first uses opDispatch to dispatch to a member. The second is a
simple string function that generates the appropriate code. As
discussed the latter composes but the former doesn't.
I can't picture what you're talking about. Could you post an example?
struct A
{
void fun(int);
}
struct B
{
A a;
mixin forwardToMember!(a, "fun");
}
struct C
{
B b;
mixin forwardToMember!(b, "fun");
}
Andrei