OpAssign

Wrap an operator assignment overload.

struct OpAssign (
string _op
rhs_t = Guess
) if (
IsPyAsg(_op)
) {
enum op;
enum bool needs_shim;
}

Examples

1 class Foo{
2     int _j;
3     void opOpAssign(string op)(int i) if(op == "+"){
4         _j = i;
5     }
6 }
7 
8 class_wrap!(Foo,
9     OpAssign!("+"));

Meta