Use bool() instead of bool{} to cast

To work around a MinGW GCC 5 issue.
master
Chris Robinson 2022-04-25 20:02:18 -07:00
parent 2daed0d0b4
commit 7c33c1b2e6
1 changed files with 2 additions and 2 deletions

View File

@ -310,10 +310,10 @@ public:
template<typename U>
constexpr T value_or(U&& defval) const&
{ return bool{*this} ? **this : static_cast<T>(std::forward<U>(defval)); }
{ return bool(*this) ? **this : static_cast<T>(std::forward<U>(defval)); }
template<typename U>
constexpr T value_or(U&& defval) &&
{ return bool{*this} ? std::move(**this) : static_cast<T>(std::forward<U>(defval)); }
{ return bool(*this) ? std::move(**this) : static_cast<T>(std::forward<U>(defval)); }
template<typename ...Args>
constexpr T& emplace(Args&& ...args)