diff --git a/include/stratosphere/ipc/ipc_serialization.hpp b/include/stratosphere/ipc/ipc_serialization.hpp index 74086a7a..4c856b89 100644 --- a/include/stratosphere/ipc/ipc_serialization.hpp +++ b/include/stratosphere/ipc/ipc_serialization.hpp @@ -560,12 +560,11 @@ struct Encoder> { /* ================================================================================= */ -template +template> constexpr Result WrapIpcCommandImpl(IpcResponseContext *ctx) { using InArgs = typename PopFront>::type; using OutArgs = typename boost::callable_traits::return_type_t; - using ClassType = typename boost::callable_traits::class_of_t; - + static_assert(std::is_base_of_v, ClassType>, "Override class type incorrect"); using CommandMetaData = CommandMetaInfo; static_assert(CommandMetaData::ReturnsResult || CommandMetaData::ReturnsVoid, "IpcCommandImpls must return Result or void"); @@ -664,5 +663,16 @@ inline static constexpr ServiceCommandMeta MakeServiceCommandMeta() { }; }; +template +inline static constexpr ServiceCommandMeta MakeServiceCommandMetaEx() { + return { + .fw_low = l, + .fw_high = h, + .cmd_id = c, + .handler = WrapIpcCommandImpl, + }; +}; + + #pragma GCC diagnostic pop