diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-11-14 19:14:09 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-11-14 19:39:35 +0000 |
| commit | 6d79ade01976ddca7d6bace2a22a92a599b9b991 (patch) | |
| tree | 86c630ddff1999dd3ffa5c8e46a46251bafb4ccb /src/flags.hh | |
| parent | b3ba769220aad0a3ac2a969d43c58396b3753aa7 (diff) | |
Tweak RankedMatch behaviour and fix bug in its comparison function
casting TestableFlag<T> to UnderlyingType<T> was going through bool
conversion... Not sure how things worked earlier.
Diffstat (limited to 'src/flags.hh')
| -rw-r--r-- | src/flags.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flags.hh b/src/flags.hh index 824d37ca..d9755efa 100644 --- a/src/flags.hh +++ b/src/flags.hh @@ -37,6 +37,7 @@ struct TestableFlags Flags value; constexpr operator bool() const { return (UnderlyingType<Flags>)value; } constexpr operator Flags() const { return value; } + constexpr operator UnderlyingType<Flags>() const { return (UnderlyingType<Flags>)value; } bool operator==(const TestableFlags<Flags>& other) const { return value == other.value; } bool operator!=(const TestableFlags<Flags>& other) const { return value != other.value; } |
