Skip to content

Commit ea5a687

Browse files
authored
Add noexcept as std::shared_ptr::reset() is noexcept (#576)
1 parent 2c9912b commit ea5a687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/stlab/concurrency/future.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ class STLAB_NODISCARD() future<T, enable_if_copyable<void_to_monostate_t<T>>> {
828828
self._detach(std::move(*this), std::forward<F>(f));
829829
}
830830

831-
void reset() { _p.reset(); }
831+
void reset() noexcept { _p.reset(); }
832832

833833
[[nodiscard]] auto is_ready() const& -> bool { return _p && _p->is_ready(); }
834834

@@ -945,7 +945,7 @@ class STLAB_NODISCARD() future<T, enable_if_not_copyable<void_to_monostate_t<T>>
945945
self._detach(std::move(*this), std::forward<F>(f));
946946
}
947947

948-
void reset() { _p.reset(); }
948+
void reset() noexcept { _p.reset(); }
949949

950950
[[nodiscard]] auto is_ready() const& -> bool { return _p && _p->is_ready(); }
951951

0 commit comments

Comments
 (0)