22 class base_disposable_impl :
public BaseInterface
25 base_disposable_impl() =
default;
26 base_disposable_impl(
const base_disposable_impl&) =
delete;
27 base_disposable_impl(base_disposable_impl&&)
noexcept =
delete;
29 bool is_disposed()
const noexcept final
32 return m_disposed.load(std::memory_order::seq_cst);
36 void dispose_impl(interface_disposable::Mode mode)
noexcept final
39 if (m_disposed.exchange(
true, std::memory_order::seq_cst) ==
false)
40 base_dispose_impl(mode);
44 virtual void base_dispose_impl(interface_disposable::Mode)
noexcept {};
47 std::atomic_bool m_disposed{};