11 using storage_type = Storage;
12 using listener_type = Listener;
17 void call() { listener.call(storage); }
19 template <
class... Args>
20 Dispatcher(Args&&... args) : storage(std::forward<Args>(args)...),
22 if constexpr (CallInit) {
33 Dispatcher(Dispatcher&&) =
default;
34 Dispatcher& operator=(Dispatcher&&) =
default;
36 Dispatcher& operator=(Storage
const& other) {
41 Dispatcher& operator=(Storage&& other) {
42 storage = std::move(other);
47 operator Storage
const&()
const {
return storage; }
49 operator Storage&() {
return storage; }