13#include <rpp/disposables/fwd.hpp>
15#include <rpp/disposables/details/container.hpp>
19namespace rpp::details::observers
21 enum class disposables_mode : uint8_t
38 } -> std::same_as<bool>;
43 template<
typename DisposableContainer>
59 template<
size_t Count>
66 template<disposables_mode mode>
67 consteval auto* deduce_optimal_disposables_strategy()
69 static_assert(mode == disposables_mode::Auto || mode == disposables_mode::None || mode == disposables_mode::External);
71 if constexpr (mode == disposables_mode::Auto)
72 return static_cast<default_disposables_strategy*
>(
nullptr);
73 else if constexpr (mode == disposables_mode::None)
75 else if constexpr (mode == disposables_mode::External)
78 return static_cast<void*
>(
nullptr);
82 template<rpp::details::observers::disposables_mode Mode>
83 using deduce_optimal_disposables_strategy_t = std::remove_pointer_t<decltype(details::deduce_optimal_disposables_strategy<Mode>())>;
disposable_wrapper_impl< interface_disposable > disposable_wrapper
Wrapper to keep "simple" disposable. Specialization of rpp::disposable_wrapper_impl.
Definition fwd.hpp:34
Definition disposables_strategy.hpp:51