Skip to content

Commit

Permalink
We can't have a bool operator apparently. Otherwise casts won't work
Browse files Browse the repository at this point in the history
correctly.
  • Loading branch information
Andersbakken committed May 20, 2015
1 parent a8c183e commit 995a8b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rct/Flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Flags

Flags<T> operator~() const { return static_cast<T>(~static_cast<unsigned long long>(mValue)); }
bool operator!() const { return !mValue; }
operator bool() const { return mValue; }
operator T() const { return mValue; }

bool test(T flag) const { return mValue & flag; }
Flags<T> test(Flags<T> flags) const { return mValue & flags; }
Expand Down

0 comments on commit 995a8b4

Please sign in to comment.