| 172 | |
| 173 | template <typename T> |
| 174 | void dispatch(const PID<T>& pid, void (T::*method)()) |
| 175 | { |
| 176 | std::unique_ptr<lambda::CallableOnce<void(ProcessBase*)>> f( |
| 177 | new lambda::CallableOnce<void(ProcessBase*)>( |
| 178 | [=](ProcessBase* process) { |
| 179 | assert(process != nullptr); |
| 180 | T* t = dynamic_cast<T*>(process); |
| 181 | assert(t != nullptr); |
| 182 | (t->*method)(); |
| 183 | })); |
| 184 | |
| 185 | internal::dispatch(pid, std::move(f), &typeid(method)); |
| 186 | } |
| 187 | |
| 188 | template <typename T> |
| 189 | void dispatch(const Process<T>& process, void (T::*method)()) |
no test coverage detected