summaryrefslogtreecommitdiff
path: root/cpp/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test.cpp')
-rw-r--r--cpp/test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/test.cpp b/cpp/test.cpp
index 7c91fbd..b63f9a1 100644
--- a/cpp/test.cpp
+++ b/cpp/test.cpp
@@ -28,9 +28,10 @@ public:
}
try {
- std::string s;
+ std::stringstream s;
msgpack::pack(s, o);
- object ro = msgpack::unpack(s.data(), s.size(), m_zone);
+ std::string str(s.str());
+ object ro = msgpack::unpack(str.data(), str.size(), m_zone);
if(ro != o) { throw std::runtime_error("NOT MATCH"); }
} catch (std::runtime_error& e) {
std::cout << "** REUNPACK FAILED **" << std::endl;