msgpack::unpacked is a typedef of the msgpack::object_handle.
I recommend using msgpack::object_handle. It can be used not only
holding unpacked msgpack objects but also msgpack::objects that are
created by any types.
Replaced unpack() APIs in test codes and examples. They used to use old
APIs.
If MSGPACK_DISABLE_LEGACY_CONVERT is defined, msgpack::object::convert(T*) is removed.
Added MSGPACK_DISABLE_LEGACY_CONVERT to build system and documents.
Please define MSGPACK_DISABLE_LEGACY_CONVERT and update your code as follows:
Replace
int i;
obj.convert(&i); // Removed pointer version
with
int i;
obj.convert(i); // Reference version
Implemented msgpack::object_handle using the same design pattern as std::auto_ptr and std::auto_ptr_ref.
Minimized the uses of #if defined(MSGPACK_USE_CPP03) conditional macro.
enum support had been incomplete.
This fix made enum support complete.
Replaced int with auto on c++11 scoped enum.
Replaced template specializations with function overloads on operator<< and operator>> for enum.
enum can convert to object with and without zone.
When you want to adapt enum, you need to write as follows:
// NOT msgpack.hpp
enum yourenum {
elem
};
MSGPACK_ADD_ENUM(yourenum);
// msgpack.hpp should be included after MSGPACK_ADD_ENUM(...)
int main() {
msgpack::object obj(yourenum::elem);
}
The names of float format family are changed.
old new
dec -> f64
MSGPACK_OBJECT_DOUBLE -> MSGPACK_OBJECT_FLOAT
msgpack::type::DOUBLE -> msgpack::type::FLOAT
Client codes could have compile errors when it use dec, MSGPACK_OBJECT_DOUBLE or msgpack::type::DOUBLE.
The best way to fix such errors, update client code. If it can't, set MSGPACK_USE_LEGACY_NAME_AS_FLOAT macro.
Then both old names and new names are available.