mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 22:50:19 +02:00
Fixed #806.
Removed `ss.str().data()` (the type of ss is std::stringstream). Introduced variable that is const reference of `ss.str()`.
This commit is contained in:
@@ -71,7 +71,8 @@ int main() {
|
||||
|
||||
print(ss.str());
|
||||
|
||||
msgpack::object_handle oh = msgpack::unpack(ss.str().data(), ss.str().size());
|
||||
std::string const& str = ss.str();
|
||||
msgpack::object_handle oh = msgpack::unpack(str.data(), str.size());
|
||||
|
||||
msgpack::object obj = oh.get();
|
||||
std::cout << obj << std::endl;
|
||||
|
Reference in New Issue
Block a user