Don't implicitly convert optionals to bools

This commit is contained in:
Chris Robinson 2022-02-14 03:05:35 -08:00
parent c6b301b72e
commit f9ed6f85c8

View File

@ -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; }