diff options
author | Chris Robinson <[email protected]> | 2022-02-14 03:05:35 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-14 03:05:35 -0800 |
commit | f9ed6f85c89a8ee194a56449eafbdcb311abd534 (patch) | |
tree | 33e67b27110bf13fff8fcb238e09697a10c8e82d /common/aloptional.h | |
parent | c6b301b72e2713ce058c65f9ed5cfe361755ea38 (diff) |
Don't implicitly convert optionals to bools
Diffstat (limited to 'common/aloptional.h')
-rw-r--r-- | common/aloptional.h | 2 |
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; } |