aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-04-25 20:02:18 -0700
committerChris Robinson <[email protected]>2022-04-25 21:11:10 -0700
commit7c33c1b2e677acfc9977d6e90dbfc72674f091ca (patch)
treec3a5e6889a350d45f7585fe202beecd5b7ba5cd8 /common
parent2daed0d0b4e264c97dc0491e5d7fc6847cd1289d (diff)
Use bool() instead of bool{} to cast
To work around a MinGW GCC 5 issue.
Diffstat (limited to 'common')
-rw-r--r--common/aloptional.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/aloptional.h b/common/aloptional.h
index 6180d161..6de16799 100644
--- a/common/aloptional.h
+++ b/common/aloptional.h
@@ -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)