diff --git a/include/fc/io/raw.hpp b/include/fc/io/raw.hpp index 49dc93f..223d317 100644 --- a/include/fc/io/raw.hpp +++ b/include/fc/io/raw.hpp @@ -122,6 +122,13 @@ namespace fc { s.read((char*)&v.data[0],N*sizeof(T)); } FC_RETHROW_EXCEPTIONS( warn, "fc::array", ("type",fc::get_typename::name())("length",N) ) } + template + inline void unpack( Stream& s, std::shared_ptr& v) + { try { + v = std::make_shared(); + unpack( s, *v ); + } FC_RETHROW_EXCEPTIONS( warn, "std::shared_ptr", ("type",fc::get_typename::name()) ) } + template inline void pack( Stream& s, const signed_int& v ) { uint32_t val = (v.value<<1) ^ (v.value>>31); do {