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>.
std::vector<unsigned char> and std::array<unsigned char> are mapped to BIN.
std::vector<uint8_t> and std::array<uint8_t> are mapped to BIN if uint8_t is the same type of unsigned char, otherwise mapped to ARRAY.
Added array_ref. When client wraps BIN mapped types above with array_ref as msgpack::type::array_ref<std::vector<char> >, the type is mapped to ARRAY.
Added char const* to std::string conversion constructor.
Added integer familiy constructor. int64_t is only used when an actual value is negative.
Clients no longer need to use casts for std::string and ingeter family.
The parameter 'offset' of unpack() function family, not unpacker family, updates only when the function successfully finished.
The parameter 'offset' used to update even if a caller passes insufficient bytes to the unpack() function family.
Replaced boost/ with msgpack/ and BOOST with MSGPACK in Boost.Preprocessor files.
Renamed existing macron in versioning.hpp to avoid confict with MSGPACK_PP_*.
Removed MSGPACK_USE_BOOST requirement from MSGPACK_DEFINE_MAP.