mirror of
https://github.com/Naios/continuable.git
synced 2025-12-08 01:36:46 +08:00
Fix the memory leak tested in 5751152733
This commit is contained in:
parent
032fc436b9
commit
9c4b0a3a17
@ -194,6 +194,12 @@ public:
|
||||
expected& operator=(expected const&) = default;
|
||||
expected& operator=(expected&&) = default;
|
||||
|
||||
~expected() noexcept(
|
||||
std::is_nothrow_destructible<T>::value&&
|
||||
std::is_nothrow_destructible<types::error_type>::value) {
|
||||
weak_destroy();
|
||||
}
|
||||
|
||||
explicit expected(T value) //
|
||||
: expected(std::move(value), detail::slot_t::value) {
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user