Skip to content

Commit

Permalink
add copy operator to SafeEnum (#197)
Browse files Browse the repository at this point in the history
(cherry picked from commit 970b929)
  • Loading branch information
Noel215 authored and mergify[bot] committed May 22, 2023
1 parent 0a91896 commit 653f744
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SafeEnum
: mFlags(original.mFlags) {}
~SafeEnum() = default;

SafeEnum & operator=(const SafeEnum & original) = default;
SafeEnum & operator|=(ENUM addValue) {mFlags |= addValue; return *this;}
SafeEnum operator|(ENUM addValue) {SafeEnum result(*this); result |= addValue; return result;}
SafeEnum & operator&=(ENUM maskValue) {mFlags &= maskValue; return *this;}
Expand Down

0 comments on commit 653f744

Please sign in to comment.