@@ -260,17 +260,17 @@ namespace msgpack {
260260 MAP4 = 0x0F , // same as FIXMAP
261261 };
262262
263- template <typename ClassType, typename ArgType>
264- using has_to_msgpack_impl = typename std::enable_if<
265- std::is_same<decltype (&ClassType::to_msgpack), void (ClassType::*)(ArgType) const >::value>::type;
266- template <typename ClassType, typename ArgType>
267- using has_to_msgpack = arx::is_detected<has_to_msgpack_impl, ClassType, ArgType>;
263+ // template <typename ClassType, typename ArgType>
264+ // using has_to_msgpack_impl = typename std::enable_if<
265+ // std::is_same<decltype(&ClassType::to_msgpack), void (ClassType::*)(ArgType) const>::value>::type;
266+ // template <typename ClassType, typename ArgType>
267+ // using has_to_msgpack = arx::is_detected<has_to_msgpack_impl, ClassType, ArgType>;
268268
269- template <typename ClassType, typename ArgType>
270- using has_from_msgpack_impl = typename std::enable_if<
271- std::is_same<decltype (&ClassType::from_msgpack), void (ClassType::*)(ArgType)>::value>::type;
272- template <typename ClassType, typename ArgType>
273- using has_from_msgpack = arx::is_detected<has_from_msgpack_impl, ClassType, ArgType>;
269+ // template <typename ClassType, typename ArgType>
270+ // using has_from_msgpack_impl = typename std::enable_if<
271+ // std::is_same<decltype(&ClassType::from_msgpack), void (ClassType::*)(ArgType)>::value>::type;
272+ // template <typename ClassType, typename ArgType>
273+ // using has_from_msgpack = arx::is_detected<has_from_msgpack_impl, ClassType, ArgType>;
274274
275275} // namespace msgpack
276276} // namespace arduino
@@ -279,16 +279,16 @@ namespace msgpack {
279279 void to_msgpack (MsgPack::Packer& packer) const { \
280280 packer.to_array (__VA_ARGS__); \
281281 } \
282- void from_msgpack (MsgPack::Unpacker& unpacker) { \
283- unpacker.from_array (__VA_ARGS__); \
282+ bool from_msgpack (MsgPack::Unpacker& unpacker) { \
283+ return unpacker.from_array (__VA_ARGS__); \
284284 }
285285
286286#define MSGPACK_DEFINE_MAP (...) \
287287 void to_msgpack (MsgPack::Packer& packer) const { \
288288 packer.to_map (__VA_ARGS__); \
289289 } \
290- void from_msgpack (MsgPack::Unpacker& unpacker) { \
291- unpacker.from_map (__VA_ARGS__); \
290+ bool from_msgpack (MsgPack::Unpacker& unpacker) { \
291+ return unpacker.from_map (__VA_ARGS__); \
292292 }
293293
294294#define MSGPACK_BASE (base ) (*const_cast <base*>(static_cast <base const *>(this )))
0 commit comments