In this function:
const bool isRhsSet = std::any_of(mxs.begin(), mxs.end(), [lhs](CarOptions option) { return static_cast<bool>(lhs & option); });
shouldn't we capture rhs instead?
rhs
I wonder if the function is also correctly named. Could it be named isRhsExclusive?
isRhsExclusive
Thanks, Pierre! Indeed, I shouldn't have duplicated the lines! I updated. The name could also be better, let me update it. Thanks for the remarks.
You're welcome :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In this function:
shouldn't we capture
rhs
instead?I wonder if the function is also correctly named. Could it be named
isRhsExclusive
?Thanks, Pierre! Indeed, I shouldn't have duplicated the lines! I updated. The name could also be better, let me update it.
Thanks for the remarks.
You're welcome :)