diff --git a/include/sp/protocol/MessageFactory.h b/include/sp/protocol/MessageFactory.h index 0957977..e14a409 100644 --- a/include/sp/protocol/MessageFactory.h +++ b/include/sp/protocol/MessageFactory.h @@ -19,7 +19,7 @@ class MessageFactory { m_Factory.resize(messageCount); TupleForEach([this](const auto& message){ std::size_t messageID = static_cast(message.GetId()); - using MessageType = std::remove_const_t>; + using MessageType = std::decay_t; m_Factory.emplace(m_Factory.begin() + messageID, []() -> std::unique_ptr { return std::make_unique(); }); }, TTMessages{}); }