We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 555cd3f + b9d06fe commit 65938a9Copy full SHA for 65938a9
example/cpp11/container.cpp
@@ -25,8 +25,9 @@ void array() {
25
std::stringstream ss;
26
msgpack::pack(ss, a);
27
28
- msgpack::object_handle oh = msgpack::unpack(ss.str().data(), ss.str().size());
29
- msgpack::object obj = oh.get();
+ auto const& str = ss.str();
+ auto oh = msgpack::unpack(str.data(), str.size());
30
+ auto obj = oh.get();
31
32
std::cout << obj << std::endl;
33
assert((obj.as<std::array<int, 5>>()) == a);
0 commit comments