From 7b6431f20e06ffe700f1cb6df61f544360769e4b Mon Sep 17 00:00:00 2001 From: theoreticalbts Date: Fri, 8 Jan 2016 11:20:32 -0500 Subject: [PATCH] raw.hpp: Add pack() override for shared_ptr --- include/fc/io/raw.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/fc/io/raw.hpp b/include/fc/io/raw.hpp index 223d317..44597bf 100644 --- a/include/fc/io/raw.hpp +++ b/include/fc/io/raw.hpp @@ -110,12 +110,18 @@ namespace fc { s.read( (char*)&usec_as_int64, sizeof(usec_as_int64) ); usec = fc::microseconds(usec_as_int64); } FC_RETHROW_EXCEPTIONS( warn, "" ) } - + template inline void pack( Stream& s, const fc::array& v) { s.write((const char*)&v.data[0],N*sizeof(T)); } + template + inline void pack( Stream& s, const std::shared_ptr& v) + { + pack( s, *v ); + } + template inline void unpack( Stream& s, fc::array& v) { try {