Details
Description
Currently, this rule is very verbose, and most findings are related to bitfield operations performed on enums. |, &, |=, &=, (maybe more surprisingly) <<.
Maybe we should allow them unconditionally, or at least allow them as soon as some enumerators had a non default initializer?
Or maybe we should remain strict, but then suggests the user that he should define overloaded operators to perform these operations? => In some cases, you want the result of this combination to be an int, so you don't need a user-defined operator
Attachments
Issue Links
- relates to
-
RSPEC-873 "enum" values should not be used as operands to built-in operators other than [ ], =, ==, !=, unary &, and the relational operators <, <=, >, >=
- Active