Skip to content

Commit 9905ea1

Browse files
committed
Execution/EventDispatcher: subscribe: Fix T[N] args
1 parent 73cf4a8 commit 9905ea1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/Execution/EventDispatcher.mpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export namespace CppUtils::Execution
2121
inline auto emit(Type::Hash eventName, const Args&... args) -> void
2222
{
2323
auto lockGuard = std::shared_lock{m_mutex};
24-
using Tuple = std::tuple<std::remove_cvref_t<Args>...>;
24+
using Tuple = std::tuple<std::decay_t<Args>...>;
2525
auto key = std::make_pair(eventName, std::type_index{typeid(Tuple)});
2626
if (auto subscriberIt = m_subscribers.find(key); subscriberIt != std::cend(m_subscribers))
2727
{
@@ -45,7 +45,7 @@ export namespace CppUtils::Execution
4545
using FunctionType = std::decay_t<decltype(function)>;
4646
using ArgumentsTypes = typename Type::CallableTrait<FunctionType>::ArgumentsTypes;
4747
[&]<class... Args>(std::tuple<Args...>*) {
48-
using Tuple = std::tuple<std::remove_cvref_t<Args>...>;
48+
using Tuple = std::tuple<std::decay_t<Args>...>;
4949
auto lockGuard = std::unique_lock{m_mutex};
5050
auto key = std::make_pair(eventHash, std::type_index{typeid(Tuple)});
5151
m_subscribers[key].emplace_back(

0 commit comments

Comments
 (0)