Takatoshi Kondo
Takatoshi Kondo
How about this? https://wandbox.org/permlink/h9JPuQeMNFfS9nkC https://wandbox.org/permlink/x4tOyPvlfIvnm0AQ
You can also do like this. https://wandbox.org/permlink/8C1s0e1N7G5xXSzm
In the approaches above, you need to care the lifetime of `msgpack::zone`. You can make a pair of `msgpack::object` and `msgpack::zone` as follows: ```cpp #include #include int main() { auto...
`msgpack::object` is basically designed as a kind of **view type**. `msgpack::object` can be created from any C++ types that support adaptor. In addition `msgpack::object` can be created from MessagePack formatted...
> But there is some inconvenience caused by need to keep zone alive when passing msgpack::object between functions. See https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_object `msgpack::object_handle` can treat zone and `msgpack::object` (including recursive sub objects)...
@SysOverdrive , it depends on your application. Generally speaking, if the data is variable length, use `std::map` is good. But key type and value type need to be fixed. `struct`...
I'm not 100% sure what you are asking. But I guess that `MSGPACK_DEFINE_MAP` might the one you are looking for. See https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_adaptor#classes
You can implement minimal and complete code on Wandbox like this: https://wandbox.org/permlink/Hwl8003q8XVYr6Nb Then, click run and share, finally you will get permalink. Please post the permalink that demonstrates your issue.
Compile errors are detected. Your code is not complete. https://wandbox.org/permlink/2zSKeIeO7ndHqzSy Use wandbox and at lease checking compilation, please.
What does std::object mean? The root class of all classes? It doesn't exist in C++. It's not C++ style. It seems that you need to learn C++ style object handling....