Closed caemor closed 2 years ago
Is there a way for a separate macro and it works for all these operations (OP : +, -, *, /, %, &, |, ^, <<, >>) automatically?
Eg:
impl_op_ex!(op |a: &DonkeyKong, b: &DonkeyKong| -> DonkeyKong::new(a.bananas op b.bananas));
Can you elaborate a little more? Would all of the ops simply delegate to that closure?
Is there a way for a separate macro and it works for all these operations (OP : +, -, *, /, %, &, |, ^, <<, >>) automatically?
Eg: