master
Daniel Kolesa 2016-09-02 18:20:31 +01:00
parent 0dc4d5074d
commit b202cb43ad
1 changed files with 2 additions and 4 deletions

View File

@ -87,9 +87,7 @@ namespace detail {
} }
constexpr MaybeStorage(Value const &v): p_value(v), p_engaged(true) {} constexpr MaybeStorage(Value const &v): p_value(v), p_engaged(true) {}
constexpr MaybeStorage(Value &&v): constexpr MaybeStorage(Value &&v): p_value(move(v)), p_engaged(true) {}
p_value(move(v)), p_engaged(true)
{}
template<typename ...A> template<typename ...A>
constexpr MaybeStorage(InPlace, A &&...args): constexpr MaybeStorage(InPlace, A &&...args):
@ -276,7 +274,7 @@ public:
constexpr Value value_or(U &&v) && { constexpr Value value_or(U &&v) && {
static_assert( static_assert(
IsMoveConstructible<Value>, IsMoveConstructible<Value>,
"Maybe<T>::value_or: T must be copy constructible" "Maybe<T>::value_or: T must be move constructible"
); );
static_assert( static_assert(
IsConvertible<U, Value>, IsConvertible<U, Value>,