Added lacked include files.
Added a test.
Added MSVC build settings on appveyor.
Added old MSVC workaround.
Fixed a variable definition point to meet ANSI-C.
Renamed names that related to a visitor.
Renamed test name from json to json_like because I omit escape.
Added end_map_value() and end_map() implementation.
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.
Replaced the inheriting constructor with a forwarding constructor.
Removed the template constructors that are covered by the forwarding constructor.
Added std::forward() to make_tuple.
Added conversion constructor.
Moved msgpack::type::tuple to
include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp from
include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp.
msgpack::type::tuple_cat requires the class template tuple definition.
``#include <stdint.h>`` is invalid in MSVC 9 2008 . Using the system dependent header does work in my testing with MSVC9, and should be safe for other compilers I think.
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
Changed macro name from MSGPACK_USE_LEGACY_NIL to
MSGPACK_DISABLE_LEGACY_NIL. msgpack-c shouldn't make compile error on
existing codes by default without major version up.
So if you want to disable msgpack::type::nil, you need to define
MSGPACK_DISABLE_LEGACY_NIL macro.
msgpack/predef/other/endian.h always defines both
MSGPACK_ENDIAN_LITTLE_BYTE and MSGPACK_ENDIAN_BIG_BYTE, but they're
defined to a true or false value depending on whether the system is
little/big endian.
Fix this condition to check the truthiness rather than whether it is
defined, like the other locations this macro is checked.
Closes#403
Signed-off-by: James McCoy <jamessan@jamessan.com>
Previously the conversion would fail because struct object is not
generally provided for the const version of the type, but because
the wrapper would pass down the type unchanged, it would look for
exactly that missing template specialization unsuccessfully.
This is specifically an issue for std::reference_wrapper because
std::cref() returns an std::reference_wrapper<const T>.