aboutsummaryrefslogtreecommitdiffstats
path: root/common/aloptional.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-14 03:05:35 -0800
committerChris Robinson <[email protected]>2022-02-14 03:05:35 -0800
commitf9ed6f85c89a8ee194a56449eafbdcb311abd534 (patch)
tree33e67b27110bf13fff8fcb238e09697a10c8e82d /common/aloptional.h
parentc6b301b72e2713ce058c65f9ed5cfe361755ea38 (diff)
Don't implicitly convert optionals to bools
Diffstat (limited to 'common/aloptional.h')
-rw-r--r--common/aloptional.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/aloptional.h b/common/aloptional.h
index a5bc247f..59425b97 100644
--- a/common/aloptional.h
+++ b/common/aloptional.h
@@ -300,7 +300,7 @@ public:
constexpr const T&& operator*() const&& { return std::move(mStore.mValue); }
constexpr T&& operator*() && { return std::move(mStore.mValue); }
- constexpr operator bool() const noexcept { return mStore.mHasValue; }
+ constexpr explicit operator bool() const noexcept { return mStore.mHasValue; }
constexpr bool has_value() const noexcept { return mStore.mHasValue; }
constexpr T& value() & { return mStore.mValue; }