- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
template<typename ReturnType, typename... Arguments>
std::enable_if_t<!std::is_same_v<ReturnType, void>, std::deque<ReturnType>>
emit(Event<ReturnType, Arguments...>& event, const std::tuple<Arguments...>& args)
{
std::deque<ReturnType> toReturn;
for (auto&& c : event.subscribers | std::views::values)
toReturn.push_back(std::apply(c, args));
return toReturn;
}
template<typename ReturnType, typename... Arguments>
void emit(Event<ReturnType, Arguments...>& event, const std::tuple<Arguments...>& args)
{
for (auto&& c : event.subscribers | std::views::values)
std::apply(c, args);
}
Комментарии (0) RSS
Добавить комментарий