Operator Overloading

PaulS:
What's wrong with that?

Nothing wrong with it, I’m just trying to grow my understanding of the language.

Also, a sense of symmetry says that if I can overload things to allow:

myObject = x;

Then I should also be able to overload to get:

x = myObject;

BulldogLowell:
your example is a bit strange to me

Let’s say myClass represents an RGB LED that has lots of methods (dimming, flashing, etc) and many internal properties (RBG color, flash rate, etc).

So, I can overload operator= to set the color for example:

uint32_t rgbColor = 0x00FF2310;
myObject = rgbColor;

So, from symmetry, maybe I’d like to do:

rgbColor = myObject;