I came across some code that boils down to the following:
enum BAR { } class Foo{ public: void set(const BAR& bar); private: uint32_t bits; }; void Foo::set(const BAR& bar) { (uint32_t&)bits = bits | bar; }
I do not understand the meaning of c-style casting in a job in Foo :: set. Why do you need assignments? Am I crazy or does this have a purpose?
c ++
mikeyk
source share