Operator to wrap
Issue 8602 prevents disambiguation for case X opBinary(string op, T)(T t);
1 class Foo{ 2 int _j; 3 int opBinary(string op)(int i) if(op == "+"){ 4 return i+_j; 5 } 6 int opBinaryRight(string op)(int i) if(op == "+"){ 7 return i+_j; 8 } 9 } 10 11 class_wrap!(Foo, 12 OpBinary!("+"), 13 OpBinaryRight!("+"));
Wrap a binary operator overload.