In the case the target type is char[] or const char[],
If the array is '\0' teminated, msgpack-c packs the characters before
'\0', otherwise packs all characters.
When converting, the array has the size that is greater than
msgpack::object STR's size, msgpack-c adds '\0' to just after converted
characters. Otherwise msgpack-c doesn't add '\0'.
MSVC CLI defined their own nullptr and provides for __nullptr for standard C++11.
https://msdn.microsoft.com/en-us/library/4ex65770.aspx
msgpack-c introduce MSGPACK_NULLPTR for internal use, it is defined as __nullptr only if compiled on C++ CLI otherwise defined as nullptr.
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>