msgpack-cpp relies on its users to include, directly or indirectly, the <type_traits> header before including msgpack headers. If they don't, it can't compile, because std::remove_volatile will not be declared. This fixes the issue by including it from msgpack, which should be fine now that msgpack-cpp requires C++11.
When packaging msgpack into a C++20 module (by #include of msgpack in the
global module fragment and then `export using ...;` for relevant names),
MSVC (VS 17.13.5) reports the following:
```
error C2504: 'msgpack::v2::object': base class undefined
```
This is apparently due to with_zone being a nested type of msgpack::object;
in order to work around this problem, with_zone is replaced with an alias
to a struct defined outside of msgpack::object.
- msgpack::type::variant behaves as MessagePack format.
e.g.)
12.34 => double
12.0 => uint64_t
-12.34 => double
-12.0 => int64_t
- msgpack::type::variant::as_double() can be used even if interval type is
int64_t and/or uint64_t.
- msgpack::type::variant::as_*() don't return non const reference
internal value.
- fix coding style
To remove boost dependency, `-DMSGPACK_USE_BOOST=OFF` for cmake.
By default, `-DMSGPACK_USE_BOOST` is `ON`.
NOTE: In order to build tests `-DMSGPACK_USE_BOOST=ON` is required.
For C++ compiler, the option `-DMSGPACK_NO_BOOST` is required to remove
boost.
The stringification of a msgpack object shouldn't write the
raw bytes of a binary value. It will likely make the result
unprintable. Just print that it's a binary blob and include
the size. E.g.,
{"data":BIN(1032256)}
EXT is handled similarly but without the size. We now also
print the size.
Issue 994
- Enhance CMakeLists.txt files.
- Move to Boost Test from Google Test to support pre-C++11 compilers.
- Add more configurations on CI matrix builds.
- Other minor fixes
Behaviour of memcmp is undefined if any of pointers passed to it is null.
See https://en.cppreference.com/w/c/string/byte/memcmp for details.
UB was detected on test MSGPACK_V4RAW_REF.pack_unpack_fix_l with UB-sanitizer.
Previously `struct iovec` was explicitly defined on non-Unix systems,
which caused name conflicts when other libraries (e.g. Cyrus SASL) did the same.
Using `struct iovec` as `msgpack::iovec` solves the problem.