I don't have a C++ compiler with me right now and can't find an answer on the net and I keep on going back and forth in my head on whether this would be legal or not.
So here is my struct in question...
So my WORLD_PROP_KEY is an enumeration which tracks which World Property this struct is associated with. My question is will the equality operator work?
So here is my struct in question...
Code:
struct WorldProperty { WORLD_PROP_KEY eKey; union value { bool bValue; float fValue; int nValue; }; bool operator==(const WorldProperty & rhs) const{return eKey == rhs.eKey && value == value;}; };
Comment