views:

96

answers:

2

I have a wrapper class for an object. I want it to apply all operations applied to it on the wrapped object, e.g wrapper+=a would yield the same result as wrapped+=a, for instance. I want to apply this for all operators. Any simple way to override all operators without overriding each one explicitly?

+1  A: 

No, sorry. Though you could write an interface (probably as a decorator or base class) that makes this easy, if you need to do it more than once. Or use one provided already. (Guess I was 40s too late.)

Roger Pate