13#include <rpp/disposables/fwd.hpp>
15#include <rpp/disposables/details/base_disposable.hpp>
16#include <rpp/disposables/disposable_wrapper.hpp>
25 template<rpp::constra
int::is_nothrow_invocable Fn>
26 class callback_disposable final :
public details::base_disposable
29 explicit callback_disposable(Fn&& fn)
34 explicit callback_disposable(
const Fn& fn)
40 void base_dispose_impl(interface_disposable::Mode)
noexcept override { std::move(m_fn)(); }
43 RPP_NO_UNIQUE_ADDRESS Fn m_fn;
46 template<rpp::constra
int::is_nothrow_invocable Fn>
static disposable_wrapper_impl make(TArgs &&... args)
Definition disposable_wrapper.hpp:164
disposable_wrapper_impl< interface_disposable > disposable_wrapper
Wrapper to keep "simple" disposable. Specialization of rpp::disposable_wrapper_impl.
Definition fwd.hpp:34