The CSet class manages bitfields. It has an [] operator which gives write access to a specific bit wrapped in a CSetHelper.
A copy-constructor and a copy-assignment operator are added to CSetHelper. The new copy-assignment operator wraps the existing one.
This is required for CSetHelper assignments where the rhs expression is also a CSetHelper, like this:
CSet<int> set; set[4] = set[5];
Works as probably intended in a standalone program. We should take a mental note to add a unit test for this if we ever integrate a unit test framework.
The
CSet
class manages bitfields. It has an[]
operator which gives write access to a specific bit wrapped in aCSetHelper
. A copy-constructor and a copy-assignment operator are added toCSetHelper
. The new copy-assignment operator wraps the existing one. This is required forCSetHelper
assignments where the rhs expression is also aCSetHelper
, like this:CSet<int> set; set[4] = set[5];
Works as probably intended in a standalone program. We should take a mental note to add a unit test for this if we ever integrate a unit test framework.