On 02/26/2012 01:12 PM, deadalnix wrote:
Le 25/02/2012 14:10, Timon Gehr a écrit :
On 02/21/2012 07:57 PM, deadalnix wrote:
opDispatch is nice, but rather incomplete. It doesn't handle template
methods for example.
It surely does.
struct S{
template opDispatch(string op){
auto opDispatch(T...)(T args){
writeln(op, args);
}
}
}
void main() {
S s;
s.foo(1,2.0,"bar");
}
Explicit template argument, I should have precised.
Please validate your non-trivial claims before you make them. Otherwise,
time gets wasted discussing non-existent problems. A good way to ensure
what you claim is true is to always provide a minimal code example that
demonstrates the claim, after having verified that the code indeed
exposes the problematic behavior when compiled with the latest version
of the reference compiler.