forked from TartanLlama/expected
+ Fixed unused variable warning + Added a `std::move` to avoid calling copy-assignment operator on non-copyable types Co-authored-by: andy-byers <andrew.byers@utdallas.edu>
This commit is contained in:
co-authored by
andy-byers
parent
79a2068c9a
commit
f5e6e9aeed
@@ -208,6 +208,7 @@ template <typename E>
|
||||
#ifdef TL_EXPECTED_EXCEPTIONS_ENABLED
|
||||
throw std::forward<E>(e);
|
||||
#else
|
||||
(void)e;
|
||||
#ifdef _MSC_VER
|
||||
__assume(0);
|
||||
#else
|
||||
@@ -824,7 +825,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
|
||||
geterr().~unexpected<E>();
|
||||
construct(std::move(rhs).get());
|
||||
} else {
|
||||
assign_common(rhs);
|
||||
assign_common(std::move(rhs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user