summaryrefslogtreecommitdiffstats
path: root/include/ipmid/message/pack.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ipmid/message/pack.hpp')
-rw-r--r--include/ipmid/message/pack.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ipmid/message/pack.hpp b/include/ipmid/message/pack.hpp
index 8a9abe1..4314ac1 100644
--- a/include/ipmid/message/pack.hpp
+++ b/include/ipmid/message/pack.hpp
@@ -93,6 +93,17 @@ struct PackSingle
}
};
+/** @brief Specialization of PackSingle for std::tuple<T> */
+template <typename... T>
+struct PackSingle<std::tuple<T...>>
+{
+ static int op(Payload& p, const std::tuple<T...>& v)
+ {
+ return std::apply([&p](const T&... args) { return p.pack(args...); },
+ v);
+ }
+};
+
/** @brief Specialization of PackSingle for std::string
* represented as a UCSD-Pascal style string
*/
OpenPOWER on IntegriCloud