fixed build

This commit is contained in:
Yuri Kovalenko
2020-08-15 23:37:43 +03:00
parent 91a52123d1
commit d3d37ec927

View File

@ -741,8 +741,7 @@ public:
static_assert(detail::is_optional<result>::value,
"F must return an optional");
return has_value() ? detail::invoke(std::forward<F>(f), **this)
: result(nullopt);
return has_value() ? detail::invoke(std::forward<F>(f), **this) : result(nullopt);
}
template <class F>
@ -1582,7 +1581,7 @@ public:
static_assert(detail::is_optional<result>::value,
"F must return an optional");
return has_value() ? detail::invoke(std::forward<F>(f), std::move(**this))
return has_value() ? detail::invoke(std::forward<F>(f), **this)
: result(nullopt);
}
@ -1601,7 +1600,7 @@ public:
static_assert(detail::is_optional<result>::value,
"F must return an optional");
return has_value() ? detail::invoke(std::forward<F>(f), std::move(**this))
return has_value() ? detail::invoke(std::forward<F>(f), **this)
: result(nullopt);
}
#endif
@ -1624,7 +1623,7 @@ public:
static_assert(detail::is_optional<result>::value,
"F must return an optional");
return has_value() ? detail::invoke(std::forward<F>(f), std::move(**this))
return has_value() ? detail::invoke(std::forward<F>(f), **this)
: result(nullopt);
}
@ -2033,7 +2032,7 @@ public:
static_assert(std::is_move_constructible<T>::value &&
std::is_convertible<U &&, T>::value,
"T must be move constructible and convertible from U");
return has_value() ? std::move(**this) : static_cast<T>(std::forward<U>(u));
return has_value() ? **this : static_cast<T>(std::forward<U>(u));
}
/// Destroys the stored value if one exists, making the optional empty