From ded4c74ea034e3ca9a1de2e8b6a88b1b01f2f917 Mon Sep 17 00:00:00 2001 From: Vernon Mauery Date: Tue, 2 Apr 2019 16:26:11 -0700 Subject: Fix utility.hpp to use correct types for Request and Context When requesting a Request or Context object as part of the handler signature, it should be a std::shared_ptr or std::shared_ptr. There was a bug that made it so it was not possible to have either of those in the signature. This commit enables both. Change-Id: Ib52000f643d7b5f21bc4022629e7d7b03a524dc1 Signed-off-by: Vernon Mauery --- include/ipmid/utility.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/ipmid/utility.hpp b/include/ipmid/utility.hpp index 3a36434..79c76f7 100644 --- a/include/ipmid/utility.hpp +++ b/include/ipmid/utility.hpp @@ -27,7 +27,12 @@ namespace ipmi { +// forward declare Context and Request for NonIpmiArgsCount struct Context; +namespace message +{ +struct Request; +} namespace utility { @@ -86,7 +91,11 @@ struct NonIpmiArgsCount> { constexpr static std::size_t size() { - if constexpr (std::is_same::value || + if constexpr (std::is_same< + FirstArg, + std::shared_ptr>::value || + std::is_same>::value || std::is_same::value) { return 1 + NonIpmiArgsCount>::size(); -- cgit v1.2.1