Fix forwarding issue

This commit is contained in:
Jeremy 2023-10-05 10:58:03 -04:00
parent 75677dda70
commit 3b5064f1ff
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4

View File

@ -230,7 +230,7 @@ namespace detail {
typename std::enable_if<!std::is_same<typename std::decay<U>::type, optional<T>>::value, int>::type = 0
>
optional& operator=(U&& value) {
optional o(std::move(value));
optional o(std::forward<U>(value));
swap(o);
return *this;
}