From 6d79ade01976ddca7d6bace2a22a92a599b9b991 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 14 Nov 2016 19:14:09 +0000 Subject: Tweak RankedMatch behaviour and fix bug in its comparison function casting TestableFlag to UnderlyingType was going through bool conversion... Not sure how things worked earlier. --- src/flags.hh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/flags.hh') 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)value; } constexpr operator Flags() const { return value; } + constexpr operator UnderlyingType() const { return (UnderlyingType)value; } bool operator==(const TestableFlags& other) const { return value == other.value; } bool operator!=(const TestableFlags& other) const { return value != other.value; } -- cgit v1.2.3