diff --git a/CMakeLists.txt b/CMakeLists.txt index 10ba1d19618..fa5ab729781 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,7 +189,7 @@ include_directories( lib/ lib/flb_libco lib/sha1 - lib/msgpack-2.1.3/include + lib/msgpack-3.1.1/include lib/LuaJIT-2.1.0-beta3/src/ ${MONKEY_INCLUDE_DIR} ) @@ -211,7 +211,7 @@ option(MSGPACK_ENABLE_CXX OFF) option(MSGPACK_ENABLE_SHARED OFF) option(MSGPACK_BUILD_TESTS OFF) option(MSGPACK_BUILD_EXAMPLES OFF) -add_subdirectory(lib/msgpack-2.1.3 EXCLUDE_FROM_ALL) +add_subdirectory(lib/msgpack-3.1.1 EXCLUDE_FROM_ALL) # Lib: build the core libraries used by Fluent-Bit FLB_DEFINITION(JSMN_PARENT_LINKS) diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/object.hpp b/lib/msgpack-2.1.3/include/msgpack/v1/object.hpp deleted file mode 100644 index 1dd14d19b42..00000000000 --- a/lib/msgpack-2.1.3/include/msgpack/v1/object.hpp +++ /dev/null @@ -1,876 +0,0 @@ -// -// MessagePack for C++ static resolution routine -// -// Copyright (C) 2008-2014 FURUHASHI Sadayuki and KONDO Takatoshi -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef MSGPACK_V1_OBJECT_HPP -#define MSGPACK_V1_OBJECT_HPP - -#include "msgpack/object_decl.hpp" - -#include -#include -#include -#include -#include -#include -#include - -namespace msgpack { - -/// @cond -MSGPACK_API_VERSION_NAMESPACE(v1) { -/// @endcond - -struct object_kv { - msgpack::object key; - msgpack::object val; -}; - -struct object::with_zone : msgpack::object { - with_zone(msgpack::zone& z) : zone(z) { } - msgpack::zone& zone; -private: - with_zone(); -}; - - -/// The class holds object and zone -class object_handle { -public: - /// Constructor that creates nil object and null zone. - object_handle() {} - - /// Constructor that creates an object_handle holding object `obj` and zone `z`. - /** - * @param obj object - * @param z zone - */ - object_handle( - msgpack::object const& obj, -#if defined(MSGPACK_USE_CPP03) - msgpack::unique_ptr z -#else // defined(MSGPACK_USE_CPP03) - msgpack::unique_ptr&& z -#endif // defined(MSGPACK_USE_CPP03) - ) : - m_obj(obj), m_zone(msgpack::move(z)) { } - - void set(msgpack::object const& obj) - { m_obj = obj; } - - /// Get object reference - /** - * @return object - */ - const msgpack::object& get() const - { return m_obj; } - - /// Get unique_ptr reference of zone. - /** - * @return unique_ptr reference of zone - */ - msgpack::unique_ptr& zone() - { return m_zone; } - - /// Get unique_ptr const reference of zone. - /** - * @return unique_ptr const reference of zone - */ - const msgpack::unique_ptr& zone() const - { return m_zone; } - -#if defined(MSGPACK_USE_CPP03) - struct object_handle_ref { - object_handle_ref(object_handle* oh):m_oh(oh) {} - object_handle* m_oh; - }; - - object_handle(object_handle& other): - m_obj(other.m_obj), - m_zone(msgpack::move(other.m_zone)) { - } - - object_handle(object_handle_ref ref): - m_obj(ref.m_oh->m_obj), - m_zone(msgpack::move(ref.m_oh->m_zone)) { - } - - object_handle& operator=(object_handle& other) { - m_obj = other.m_obj; - m_zone = msgpack::move(other.m_zone); - return *this; - } - - object_handle& operator=(object_handle_ref ref) { - m_obj = ref.m_oh->m_obj; - m_zone = msgpack::move(ref.m_oh->m_zone); - return *this; - } - - operator object_handle_ref() { - return object_handle_ref(this); - } -#endif // defined(MSGPACK_USE_CPP03) - -private: - msgpack::object m_obj; - msgpack::unique_ptr m_zone; -}; - -namespace detail { - -template -inline std::size_t add_ext_type_size(std::size_t size) { - return size + 1; -} - -template <> -inline std::size_t add_ext_type_size<4>(std::size_t size) { - return size == 0xffffffff ? size : size + 1; -} - -} // namespace detail - -inline std::size_t aligned_zone_size(msgpack::object const& obj) { - std::size_t s = 0; - switch (obj.type) { - case msgpack::type::ARRAY: - s += sizeof(msgpack::object) * obj.via.array.size; - for (uint32_t i = 0; i < obj.via.array.size; ++i) { - s += msgpack::aligned_zone_size(obj.via.array.ptr[i]); - } - break; - case msgpack::type::MAP: - s += sizeof(msgpack::object_kv) * obj.via.map.size; - for (uint32_t i = 0; i < obj.via.map.size; ++i) { - s += msgpack::aligned_zone_size(obj.via.map.ptr[i].key); - s += msgpack::aligned_zone_size(obj.via.map.ptr[i].val); - } - break; - case msgpack::type::EXT: - s += msgpack::aligned_size( - detail::add_ext_type_size(obj.via.ext.size)); - break; - case msgpack::type::STR: - s += msgpack::aligned_size(obj.via.str.size); - break; - case msgpack::type::BIN: - s += msgpack::aligned_size(obj.via.bin.size); - break; - default: - break; - } - return s; -} - -/// clone object -/** - * Clone (deep copy) object. - * The copied object is located on newly allocated zone. - * @param obj copy source object - * - * @return object_handle that holds deep copied object and zone. - */ -inline object_handle clone(msgpack::object const& obj) { - std::size_t size = msgpack::aligned_zone_size(obj); - msgpack::unique_ptr z(size == 0 ? MSGPACK_NULLPTR : new msgpack::zone(size)); - msgpack::object newobj = z.get() ? msgpack::object(obj, *z) : obj; - return object_handle(newobj, msgpack::move(z)); -} - -template -inline object::implicit_type::operator T() { return obj.as(); } - -namespace detail { -template -struct packer_serializer { - static msgpack::packer& pack(msgpack::packer& o, const T& v) { - v.msgpack_pack(o); - return o; - } -}; -} // namespace detail - -// Adaptor functors' member functions definitions. -template -inline -msgpack::object const& -adaptor::convert::operator()(msgpack::object const& o, T& v) const { - v.msgpack_unpack(o.convert()); - return o; -} - -template -template -inline -msgpack::packer& -adaptor::pack::operator()(msgpack::packer& o, T const& v) const { - return msgpack::detail::packer_serializer::pack(o, v); -} - -template -inline -void -adaptor::object_with_zone::operator()(msgpack::object::with_zone& o, T const& v) const { - v.msgpack_object(static_cast(&o), o.zone); -} - -// Adaptor functor specialization to object -namespace adaptor { - -template <> -struct convert { - msgpack::object const& operator()(msgpack::object const& o, msgpack::object& v) const { - v = o; - return o; - } -}; - -template <> -struct pack { - template - msgpack::packer& operator()(msgpack::packer& o, msgpack::object const& v) const { - switch(v.type) { - case msgpack::type::NIL: - o.pack_nil(); - return o; - - case msgpack::type::BOOLEAN: - if(v.via.boolean) { - o.pack_true(); - } else { - o.pack_false(); - } - return o; - - case msgpack::type::POSITIVE_INTEGER: - o.pack_uint64(v.via.u64); - return o; - - case msgpack::type::NEGATIVE_INTEGER: - o.pack_int64(v.via.i64); - return o; - - case msgpack::type::FLOAT32: - o.pack_float(static_cast(v.via.f64)); - return o; - - case msgpack::type::FLOAT64: - o.pack_double(v.via.f64); - return o; - - case msgpack::type::STR: - o.pack_str(v.via.str.size); - o.pack_str_body(v.via.str.ptr, v.via.str.size); - return o; - - case msgpack::type::BIN: - o.pack_bin(v.via.bin.size); - o.pack_bin_body(v.via.bin.ptr, v.via.bin.size); - return o; - - case msgpack::type::EXT: - o.pack_ext(v.via.ext.size, v.via.ext.type()); - o.pack_ext_body(v.via.ext.data(), v.via.ext.size); - return o; - - case msgpack::type::ARRAY: - o.pack_array(v.via.array.size); - for(msgpack::object* p(v.via.array.ptr), - * const pend(v.via.array.ptr + v.via.array.size); - p < pend; ++p) { - msgpack::operator<<(o, *p); - } - return o; - - case msgpack::type::MAP: - o.pack_map(v.via.map.size); - for(msgpack::object_kv* p(v.via.map.ptr), - * const pend(v.via.map.ptr + v.via.map.size); - p < pend; ++p) { - msgpack::operator<<(o, p->key); - msgpack::operator<<(o, p->val); - } - return o; - - default: - throw msgpack::type_error(); - } - } -}; - -template <> -struct object_with_zone { - void operator()(msgpack::object::with_zone& o, msgpack::object const& v) const { - o.type = v.type; - - switch(v.type) { - case msgpack::type::NIL: - case msgpack::type::BOOLEAN: - case msgpack::type::POSITIVE_INTEGER: - case msgpack::type::NEGATIVE_INTEGER: - case msgpack::type::FLOAT32: - case msgpack::type::FLOAT64: - std::memcpy(&o.via, &v.via, sizeof(v.via)); - return; - - case msgpack::type::STR: { - char* ptr = static_cast(o.zone.allocate_align(v.via.str.size)); - o.via.str.ptr = ptr; - o.via.str.size = v.via.str.size; - std::memcpy(ptr, v.via.str.ptr, v.via.str.size); - return; - } - - case msgpack::type::BIN: { - char* ptr = static_cast(o.zone.allocate_align(v.via.bin.size)); - o.via.bin.ptr = ptr; - o.via.bin.size = v.via.bin.size; - std::memcpy(ptr, v.via.bin.ptr, v.via.bin.size); - return; - } - - case msgpack::type::EXT: { - char* ptr = static_cast(o.zone.allocate_align(v.via.ext.size + 1)); - o.via.ext.ptr = ptr; - o.via.ext.size = v.via.ext.size; - std::memcpy(ptr, v.via.ext.ptr, v.via.ext.size + 1); - return; - } - - case msgpack::type::ARRAY: - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object) * v.via.array.size)); - o.via.array.size = v.via.array.size; - for (msgpack::object - * po(o.via.array.ptr), - * pv(v.via.array.ptr), - * const pvend(v.via.array.ptr + v.via.array.size); - pv < pvend; - ++po, ++pv) { - new (po) msgpack::object(*pv, o.zone); - } - return; - - case msgpack::type::MAP: - o.via.map.ptr = (msgpack::object_kv*)o.zone.allocate_align(sizeof(msgpack::object_kv) * v.via.map.size); - o.via.map.size = v.via.map.size; - for(msgpack::object_kv - * po(o.via.map.ptr), - * pv(v.via.map.ptr), - * const pvend(v.via.map.ptr + v.via.map.size); - pv < pvend; - ++po, ++pv) { - msgpack::object_kv* kv = new (po) msgpack::object_kv; - new (&kv->key) msgpack::object(pv->key, o.zone); - new (&kv->val) msgpack::object(pv->val, o.zone); - } - return; - - default: - throw msgpack::type_error(); - } - - } -}; - -// Adaptor functor specialization to object::with_zone - -template <> -struct object_with_zone { - void operator()( - msgpack::object::with_zone& o, - msgpack::object::with_zone const& v) const { - o << static_cast(v); - } -}; - - -} // namespace adaptor - - -// obsolete -template -class define : public Type { -public: - typedef Type msgpack_type; - typedef define define_type; - define() {} - define(const msgpack_type& v) : msgpack_type(v) {} - - template - void msgpack_pack(Packer& o) const - { - msgpack::operator<<(o, static_cast(*this)); - } - - void msgpack_unpack(object const& o) - { - msgpack::operator>>(o, static_cast(*this)); - } -}; - -// deconvert operator - -template -template -inline msgpack::packer& packer::pack(const T& v) -{ - msgpack::operator<<(*this, v); - return *this; -} - -inline bool operator==(const msgpack::object& x, const msgpack::object& y) -{ - if(x.type != y.type) { return false; } - - switch(x.type) { - case msgpack::type::NIL: - return true; - - case msgpack::type::BOOLEAN: - return x.via.boolean == y.via.boolean; - - case msgpack::type::POSITIVE_INTEGER: - return x.via.u64 == y.via.u64; - - case msgpack::type::NEGATIVE_INTEGER: - return x.via.i64 == y.via.i64; - - case msgpack::type::FLOAT32: - case msgpack::type::FLOAT64: - return x.via.f64 == y.via.f64; - - case msgpack::type::STR: - return x.via.str.size == y.via.str.size && - std::memcmp(x.via.str.ptr, y.via.str.ptr, x.via.str.size) == 0; - - case msgpack::type::BIN: - return x.via.bin.size == y.via.bin.size && - std::memcmp(x.via.bin.ptr, y.via.bin.ptr, x.via.bin.size) == 0; - - case msgpack::type::EXT: - return x.via.ext.size == y.via.ext.size && - std::memcmp(x.via.ext.ptr, y.via.ext.ptr, x.via.ext.size) == 0; - - case msgpack::type::ARRAY: - if(x.via.array.size != y.via.array.size) { - return false; - } else if(x.via.array.size == 0) { - return true; - } else { - msgpack::object* px = x.via.array.ptr; - msgpack::object* const pxend = x.via.array.ptr + x.via.array.size; - msgpack::object* py = y.via.array.ptr; - do { - if(!(*px == *py)) { - return false; - } - ++px; - ++py; - } while(px < pxend); - return true; - } - - case msgpack::type::MAP: - if(x.via.map.size != y.via.map.size) { - return false; - } else if(x.via.map.size == 0) { - return true; - } else { - msgpack::object_kv* px = x.via.map.ptr; - msgpack::object_kv* const pxend = x.via.map.ptr + x.via.map.size; - msgpack::object_kv* py = y.via.map.ptr; - do { - if(!(px->key == py->key) || !(px->val == py->val)) { - return false; - } - ++px; - ++py; - } while(px < pxend); - return true; - } - - default: - return false; - } -} - -template -inline bool operator==(const msgpack::object& x, const T& y) -try { - return x == msgpack::object(y); -} catch (msgpack::type_error&) { - return false; -} - -inline bool operator!=(const msgpack::object& x, const msgpack::object& y) -{ return !(x == y); } - -template -inline bool operator==(const T& y, const msgpack::object& x) -{ return x == y; } - -template -inline bool operator!=(const msgpack::object& x, const T& y) -{ return !(x == y); } - -template -inline bool operator!=(const T& y, const msgpack::object& x) -{ return x != y; } - - -inline object::implicit_type object::convert() const -{ - return object::implicit_type(*this); -} - -template -inline -typename msgpack::enable_if< - !msgpack::is_array::value && !msgpack::is_pointer::value, - T& ->::type -object::convert(T& v) const -{ - msgpack::operator>>(*this, v); - return v; -} - -template -inline T(&object::convert(T(&v)[N]) const)[N] -{ - msgpack::operator>>(*this, v); - return v; -} - -#if !defined(MSGPACK_DISABLE_LEGACY_CONVERT) -template -inline -typename msgpack::enable_if< - msgpack::is_pointer::value, - T ->::type -object::convert(T v) const -{ - convert(*v); - return v; -} -#endif // !defined(MSGPACK_DISABLE_LEGACY_CONVERT) - -template -inline bool object::convert_if_not_nil(T& v) const -{ - if (is_nil()) { - return false; - } - convert(v); - return true; -} - -#if defined(MSGPACK_USE_CPP03) - -template -inline T object::as() const -{ - T v; - convert(v); - return v; -} - -#else // defined(MSGPACK_USE_CPP03) - -template -inline typename std::enable_if::value, T>::type object::as() const { - return msgpack::adaptor::as()(*this); -} - -template -inline typename std::enable_if::value, T>::type object::as() const { - T v; - convert(v); - return v; -} - -#endif // defined(MSGPACK_USE_CPP03) - -inline object::object() -{ - type = msgpack::type::NIL; -} - -template -inline object::object(const T& v) -{ - *this << v; -} - -template -inline object& object::operator=(const T& v) -{ - *this = object(v); - return *this; -} - -template -inline object::object(const T& v, msgpack::zone& z) -{ - with_zone oz(z); - msgpack::operator<<(oz, v); - type = oz.type; - via = oz.via; -} - -template -inline object::object(const T& v, msgpack::zone* z) -{ - with_zone oz(*z); - msgpack::operator<<(oz, v); - type = oz.type; - via = oz.via; -} - - -inline object::object(const msgpack_object& o) -{ - // FIXME beter way? - std::memcpy(this, &o, sizeof(o)); -} - -inline void operator<< (msgpack::object& o, const msgpack_object& v) -{ - // FIXME beter way? - std::memcpy(&o, &v, sizeof(v)); -} - -inline object::operator msgpack_object() const -{ - // FIXME beter way? - msgpack_object obj; - std::memcpy(&obj, this, sizeof(obj)); - return obj; -} - - -// obsolete -template -inline void convert(T& v, msgpack::object const& o) -{ - o.convert(v); -} - -// obsolete -template -inline void pack(msgpack::packer& o, const T& v) -{ - o.pack(v); -} - -// obsolete -template -inline void pack_copy(msgpack::packer& o, T v) -{ - pack(o, v); -} - - -template -inline msgpack::packer& operator<< (msgpack::packer& o, const msgpack::object& v) -{ - switch(v.type) { - case msgpack::type::NIL: - o.pack_nil(); - return o; - - case msgpack::type::BOOLEAN: - if(v.via.boolean) { - o.pack_true(); - } else { - o.pack_false(); - } - return o; - - case msgpack::type::POSITIVE_INTEGER: - o.pack_uint64(v.via.u64); - return o; - - case msgpack::type::NEGATIVE_INTEGER: - o.pack_int64(v.via.i64); - return o; - - case msgpack::type::FLOAT32: - o.pack_float(v.via.f64); - return o; - - case msgpack::type::FLOAT64: - o.pack_double(v.via.f64); - return o; - - case msgpack::type::STR: - o.pack_str(v.via.str.size); - o.pack_str_body(v.via.str.ptr, v.via.str.size); - return o; - - case msgpack::type::BIN: - o.pack_bin(v.via.bin.size); - o.pack_bin_body(v.via.bin.ptr, v.via.bin.size); - return o; - - case msgpack::type::EXT: - o.pack_ext(v.via.ext.size, v.via.ext.type()); - o.pack_ext_body(v.via.ext.data(), v.via.ext.size); - return o; - - case msgpack::type::ARRAY: - o.pack_array(v.via.array.size); - for(msgpack::object* p(v.via.array.ptr), - * const pend(v.via.array.ptr + v.via.array.size); - p < pend; ++p) { - msgpack::operator<<(o, *p); - } - return o; - - case msgpack::type::MAP: - o.pack_map(v.via.map.size); - for(msgpack::object_kv* p(v.via.map.ptr), - * const pend(v.via.map.ptr + v.via.map.size); - p < pend; ++p) { - msgpack::operator<<(o, p->key); - msgpack::operator<<(o, p->val); - } - return o; - - default: - throw msgpack::type_error(); - } -} - -template -inline msgpack::packer& operator<< (msgpack::packer& o, const msgpack::object::with_zone& v) -{ - return o << static_cast(v); -} - -inline std::ostream& operator<< (std::ostream& s, const msgpack::object& o) -{ - switch(o.type) { - case msgpack::type::NIL: - s << "null"; - break; - - case msgpack::type::BOOLEAN: - s << (o.via.boolean ? "true" : "false"); - break; - - case msgpack::type::POSITIVE_INTEGER: - s << o.via.u64; - break; - - case msgpack::type::NEGATIVE_INTEGER: - s << o.via.i64; - break; - - case msgpack::type::FLOAT32: - case msgpack::type::FLOAT64: - s << o.via.f64; - break; - - case msgpack::type::STR: - s << '"'; - for (uint32_t i = 0; i < o.via.str.size; ++i) { - char c = o.via.str.ptr[i]; - switch (c) { - case '\\': - s << "\\\\"; - break; - case '"': - s << "\\\""; - break; - case '/': - s << "\\/"; - break; - case '\b': - s << "\\b"; - break; - case '\f': - s << "\\f"; - break; - case '\n': - s << "\\n"; - break; - case '\r': - s << "\\r"; - break; - case '\t': - s << "\\t"; - break; - default: { - unsigned int code = static_cast(c); - if (code < 0x20 || code == 0x7f) { - std::ios::fmtflags flags(s.flags()); - s << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff); - s.flags(flags); - } - else { - s << c; - } - } break; - } - } - s << '"'; - break; - - case msgpack::type::BIN: - (s << '"').write(o.via.bin.ptr, o.via.bin.size) << '"'; - break; - - case msgpack::type::EXT: - s << "EXT"; - break; - - case msgpack::type::ARRAY: - s << "["; - if(o.via.array.size != 0) { - msgpack::object* p(o.via.array.ptr); - s << *p; - ++p; - for(msgpack::object* const pend(o.via.array.ptr + o.via.array.size); - p < pend; ++p) { - s << ", " << *p; - } - } - s << "]"; - break; - - case msgpack::type::MAP: - s << "{"; - if(o.via.map.size != 0) { - msgpack::object_kv* p(o.via.map.ptr); - s << p->key << ':' << p->val; - ++p; - for(msgpack::object_kv* const pend(o.via.map.ptr + o.via.map.size); - p < pend; ++p) { - s << ", " << p->key << ':' << p->val; - } - } - s << "}"; - break; - - default: - // FIXME - s << "#(o.type) << ">"; - } - return s; -} - -/// @cond -} // MSGPACK_API_VERSION_NAMESPACE(v1) -/// @endcond - -} // namespace msgpack - -#endif // MSGPACK_V1_OBJECT_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/version_master.h b/lib/msgpack-2.1.3/include/msgpack/version_master.h deleted file mode 100644 index 1ebe0953f28..00000000000 --- a/lib/msgpack-2.1.3/include/msgpack/version_master.h +++ /dev/null @@ -1,3 +0,0 @@ -#define MSGPACK_VERSION_MAJOR 2 -#define MSGPACK_VERSION_MINOR 1 -#define MSGPACK_VERSION_REVISION 3 diff --git a/lib/msgpack-2.1.3/AUTHORS b/lib/msgpack-3.1.1/AUTHORS similarity index 100% rename from lib/msgpack-2.1.3/AUTHORS rename to lib/msgpack-3.1.1/AUTHORS diff --git a/lib/msgpack-2.1.3/CMakeLists.txt b/lib/msgpack-3.1.1/CMakeLists.txt similarity index 75% rename from lib/msgpack-2.1.3/CMakeLists.txt rename to lib/msgpack-3.1.1/CMakeLists.txt index 2eb451296d4..01f3122574c 100644 --- a/lib/msgpack-2.1.3/CMakeLists.txt +++ b/lib/msgpack-3.1.1/CMakeLists.txt @@ -124,7 +124,7 @@ ENDIF () IF (MSGPACK_DEFAULT_API_VERSION) SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=${MSGPACK_DEFAULT_API_VERSION} ${CMAKE_CXX_FLAGS}") ELSE () - SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=2 ${CMAKE_CXX_FLAGS}") + SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=3 ${CMAKE_CXX_FLAGS}") ENDIF () FILE (GLOB_RECURSE PREDEF_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/external/boost/predef/include/boost ${CMAKE_CURRENT_SOURCE_DIR}/external/boost/predef/include/boost/*.h) @@ -150,12 +150,40 @@ ENDFOREACH () FIND_PACKAGE (GTest) FIND_PACKAGE (ZLIB) FIND_PACKAGE (Threads) -IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND) +IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND AND NOT "${MSGPACK_FUZZ_REGRESSION}" STREQUAL "ON") OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON) ENDIF () +IF (DEFINED BUILD_SHARED_LIBS) + IF (BUILD_SHARED_LIBS) + IF (DEFINED MSGPACK_ENABLE_SHARED AND NOT MSGPACK_ENABLE_SHARED) + MESSAGE(WARNING "MSGPACK_ENABLE_SHARED is overridden to ON by BUILD_SHARED_LIBS") + ENDIF () + SET (MSGPACK_ENABLE_SHARED ON) + IF (DEFINED MSGPACK_ENABLE_STATIC AND MSGPACK_ENABLE_STATIC) + MESSAGE(WARNING "MSGPACK_ENABLE_STATIC is overridden to OFF by BUILD_SHARED_LIBS") + ENDIF () + SET (MSGPACK_ENABLE_STATIC OFF) + ELSE () + IF (DEFINED MSGPACK_ENABLE_SHARED AND MSGPACK_ENABLE_SHARED) + MESSAGE(WARNING "MSGPACK_ENABLE_SHARED is overridden to OFF by BUILD_SHARED_LIBS") + ENDIF () + SET (MSGPACK_ENABLE_SHARED OFF) + IF (DEFINED MSGPACK_ENABLE_STATIC AND NOT MSGPACK_ENABLE_STATIC) + MESSAGE(WARNING "MSGPACK_ENABLE_STATIC is overridden to ON by BUILD_SHARED_LIBS") + ENDIF () + SET (MSGPACK_ENABLE_STATIC ON) + ENDIF () +ELSE () + IF (NOT DEFINED MSGPACK_ENABLE_SHARED) + SET (MSGPACK_ENABLE_SHARED ON) + ENDIF () + IF (NOT DEFINED MSGPACK_ENABLE_STATIC) + SET (MSGPACK_ENABLE_STATIC ON) + ENDIF () +ENDIF () + OPTION (MSGPACK_ENABLE_CXX "Enable C++ interface." ON) -OPTION (MSGPACK_ENABLE_SHARED "Build shared libaries in addition to static libraries." ON) INCLUDE (CheckCXXSourceCompiles) CHECK_CXX_SOURCE_COMPILES (" @@ -187,6 +215,8 @@ IF (MSGPACK_ENABLE_SHARED) ${msgpackc_HEADERS} ) + SET_TARGET_PROPERTIES (msgpackc PROPERTIES SOVERSION 2 VERSION 2.0.0) + TARGET_INCLUDE_DIRECTORIES (msgpackc PUBLIC $ @@ -197,35 +227,60 @@ IF (MSGPACK_ENABLE_SHARED) ) ENDIF () -ADD_LIBRARY (msgpackc-static STATIC - ${msgpackc_SOURCES} - ${msgpackc_HEADERS} -) - -TARGET_INCLUDE_DIRECTORIES (msgpackc-static - PUBLIC - $ - $ - $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} -) +IF (MSGPACK_ENABLE_CXX AND ((CMAKE_VERSION VERSION_GREATER 3.0) OR (CMAKE_VERSION VERSION_EQUAL 3.0))) + ADD_LIBRARY (msgpackc-cxx INTERFACE) -IF (NOT MSGPACK_ENABLE_SHARED) - # Add alias for subdirectories - ADD_LIBRARY (msgpackc ALIAS msgpackc-static) + TARGET_INCLUDE_DIRECTORIES (msgpackc-cxx + INTERFACE + $ + $ + $ + ) ENDIF () -SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc") -IF (MSGPACK_ENABLE_SHARED) - IF (MSVC) - SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX "_import.lib") - ELSEIF (MINGW) - SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX ".dll.a") +IF (MSGPACK_ENABLE_STATIC) + ADD_LIBRARY (msgpackc-static STATIC + ${msgpackc_SOURCES} + ${msgpackc_HEADERS} + ) + + TARGET_INCLUDE_DIRECTORIES (msgpackc-static + PUBLIC + $ + $ + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ) + + IF (NOT MSGPACK_ENABLE_SHARED) + # Add alias for subdirectories + ADD_LIBRARY (msgpackc ALIAS msgpackc-static) + ENDIF () + + SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc") + + IF (MSGPACK_ENABLE_SHARED) + IF (MSVC) + SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX "_import.lib") + ELSEIF (MINGW) + SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX ".dll.a") + ENDIF () ENDIF () - SET_TARGET_PROPERTIES (msgpackc PROPERTIES SOVERSION 2 VERSION 2.0.0) ENDIF () +# enable regression testing +IF ("${MSGPACK_FUZZ_REGRESSION}" STREQUAL "ON" AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}") + SET (Boost_USE_MULTITHREADED ON) + SET (Boost_USE_STATIC_RUNTIME OFF) + + enable_testing () + ADD_SUBDIRECTORY (fuzz) + SET (MSGPACK_BUILD_EXAMPLES OFF) +ENDIF () + + IF (MSGPACK_BUILD_TESTS) ENABLE_TESTING () # MEMORYCHECK_COMMAND_OPTIONS needs to place prior to CTEST_MEMORYCHECK_COMMAND @@ -237,16 +292,20 @@ ENDIF () IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") IF (MSGPACK_ENABLE_SHARED) - SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 -DPIC") + SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra -DPIC") + ENDIF () + IF (MSGPACK_ENABLE_STATIC) + SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra" ) ENDIF () - SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) ENDIF () IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") IF (MSGPACK_ENABLE_SHARED) SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") ENDIF () - SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") + IF (MSGPACK_ENABLE_STATIC) + SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") + ENDIF () ENDIF () IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") @@ -259,7 +318,12 @@ ENDIF () IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC90" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC10") SET_SOURCE_FILES_PROPERTIES(${msgpackc_SOURCES} PROPERTIES LANGUAGE CXX) -ENDIF() +ENDIF () + +IF ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "sparc") + SET (CMAKE_C_FLAGS "-DMSGPACK_ZONE_ALIGN=8 ${CMAKE_C_FLAGS}") + SET (CMAKE_CXX_FLAGS "-DMSGPACK_ZONE_ALIGN=8 ${CMAKE_CXX_FLAGS}") +ENDIF () IF (NOT DEFINED CMAKE_INSTALL_BINDIR) SET(CMAKE_INSTALL_BINDIR bin) @@ -274,9 +338,15 @@ IF (MSGPACK_BUILD_EXAMPLES) ENDIF () IF (MSGPACK_ENABLE_SHARED) - SET (MSGPACK_INSTALLTARGETS msgpackc msgpackc-static) -ELSE() - SET (MSGPACK_INSTALLTARGETS msgpackc-static) + SET (MSGPACK_INSTALLTARGETS msgpackc) +ENDIF () + +IF (MSGPACK_ENABLE_CXX AND ((CMAKE_VERSION VERSION_GREATER 3.0) OR (CMAKE_VERSION VERSION_EQUAL 3.0))) + LIST (APPEND MSGPACK_INSTALLTARGETS msgpackc-cxx) +ENDIF () + +IF (MSGPACK_ENABLE_STATIC) + LIST (APPEND MSGPACK_INSTALLTARGETS msgpackc-static) ENDIF () INSTALL (TARGETS ${MSGPACK_INSTALLTARGETS} EXPORT msgpack-targets @@ -302,6 +372,7 @@ IF (DOXYGEN_FOUND) COMMAND ${CMAKE_COMMAND} -E echo "INPUT = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c COMMAND ${CMAKE_COMMAND} -E echo "EXTRACT_ALL = YES" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c COMMAND ${CMAKE_COMMAND} -E echo "PROJECT_NAME = \"MessagePack for C\"" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c + COMMAND ${CMAKE_COMMAND} -E echo "STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c ) IF (DOXYGEN_DOT_FOUND) LIST (APPEND Doxyfile_c_CONTENT @@ -320,6 +391,7 @@ IF (DOXYGEN_FOUND) COMMAND ${CMAKE_COMMAND} -E echo "OUTPUT_DIRECTORY = doc_cpp" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp COMMAND ${CMAKE_COMMAND} -E echo "INPUT = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp COMMAND ${CMAKE_COMMAND} -E echo "EXTRACT_ALL = YES" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp + COMMAND ${CMAKE_COMMAND} -E echo "STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp ) IF (DOXYGEN_DOT_FOUND) LIST (APPEND Doxyfile_cpp_CONTENT diff --git a/lib/msgpack-2.1.3/COPYING b/lib/msgpack-3.1.1/COPYING similarity index 100% rename from lib/msgpack-2.1.3/COPYING rename to lib/msgpack-3.1.1/COPYING diff --git a/lib/msgpack-2.1.3/ChangeLog b/lib/msgpack-3.1.1/ChangeLog similarity index 81% rename from lib/msgpack-2.1.3/ChangeLog rename to lib/msgpack-3.1.1/ChangeLog index b45508f6ef3..2666ccf7025 100644 --- a/lib/msgpack-2.1.3/ChangeLog +++ b/lib/msgpack-3.1.1/ChangeLog @@ -1,3 +1,78 @@ +# 2018-09-09 version 3.1.1 + + * Add force endian set functionality (#736) + * Fix vrefbuffer memory management problem (#733) + * Fix msvc specific problem (#731, #732) + * Update boost from 1.61.0 to 1.68.0 (#730) + * Fix msgpack_timestamp type mismatch bug (#726) + +# 2018-08-10 version 3.1.0 + + * Improve documents (#687, #718) + * Add fuzzer support (#689) + * Fix msgpack::object union member access bug (#694) + * Improve cross platform configuration (#704) + * Fix out of range dereference bug of EXT (#705) + * Add timestamp support. std::chrono::system_clock::time_point is mapped to TIMESTAMP (#706) + * Add minimal timestamp support for C. The type `msgpack_timestamp` and the function `msgpack_object_to_timestamp()` are introduced (#707) + * Improve MSGPACK_DEFINE family name confliction probability (#710) + * Add no static-library build option (BUILD_SHARED_LIBS=ON) (#713, #717, #722) + * Add header only cmake target (#721) + * Add `std::byte` adaptor (#719) + * Remove some warnings (#720) + +# 2018-05-12 version 3.0.1 + + * Add fuzz directory to release tar ball (#686) + * Add include file checking for X-Code (#683) + +# 2018-05-09 version 3.0.0 + +## << breaking changes >> + + * Change offset parameter updating rule. If parse error happens, offset is updated to the error position. (#639, #666) + +## << other updates >> + + * Improve cross platform configuration (#655, #677) + * Improve build system (#647) + * Improve user class adaptor (#645, #673) + * Improve msgpack::object visitation logic (#676) + * Remove some warnings (#641, 659) + * Add `->` and `*` operators to object_handle (#635) + * Improve CI environment (#631, #634, #643, #657, #662, #668) + * Improve documents (#630, #661) + * Refactoring (#670) + * Add OSS-Fuzz support (#672, #674, #675, #678) + +# 2017-08-04 version 2.1.5 + * Improve cross platform configuration (#624) + * Add boost asio examples (including zlib) (#610) + * Remove some warnings (#611) + * Fix unpack visitor to treat float32/64 correctly (#613) + * Improve documents (#616) + * Fix alignment problem on some platform (#617, #518) + * Fix conflict std::tuple, std::pair, and boost::fusion::sequence problem (#619) + +# 2017-08-03 version 2.1.4 (Invalid) + * See https://github.com/msgpack/msgpack-c/issues/623 + +# 2017-06-15 version 2.1.3 + * Improve build system (#603) + * Add C++17 adaptors `std::optional` and `std::string_view`. (#607, #608) + * Improve cross platform configuration (#601) + * Remove some warnings (#599, #602, #605) + +# 2017-06-07 version 2.1.2 + +* Improve documents (#565) + * Fix empty map parse bug (#568) + * Improve build system (#569, #570, #572, #579, #591, #592) + * Remove some warnings (#574, #578, #586, #588) + * Improve cross platform configuration (#577, #582) + * Add cmake package config support (#580) + * Fix streaming unpack bug (#585) + # 2017-02-04 version 2.1.1 * Fix unpacker's buffer management bug (#561) diff --git a/lib/msgpack-2.1.3/Doxyfile b/lib/msgpack-3.1.1/Doxyfile similarity index 99% rename from lib/msgpack-2.1.3/Doxyfile rename to lib/msgpack-3.1.1/Doxyfile index ca772301041..227d6e2a24c 100644 --- a/lib/msgpack-2.1.3/Doxyfile +++ b/lib/msgpack-3.1.1/Doxyfile @@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO # causing a significant performance penality. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the +# a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols diff --git a/lib/msgpack-2.1.3/Files.cmake b/lib/msgpack-3.1.1/Files.cmake similarity index 89% rename from lib/msgpack-2.1.3/Files.cmake rename to lib/msgpack-3.1.1/Files.cmake index d055a231267..d3a204fbb6f 100644 --- a/lib/msgpack-2.1.3/Files.cmake +++ b/lib/msgpack-3.1.1/Files.cmake @@ -24,6 +24,7 @@ LIST (APPEND msgpackc_HEADERS include/msgpack/predef/architecture/mips.h include/msgpack/predef/architecture/parisc.h include/msgpack/predef/architecture/ppc.h + include/msgpack/predef/architecture/ptx.h include/msgpack/predef/architecture/pyramid.h include/msgpack/predef/architecture/rs6k.h include/msgpack/predef/architecture/sparc.h @@ -57,6 +58,7 @@ LIST (APPEND msgpackc_HEADERS include/msgpack/predef/compiler/metrowerks.h include/msgpack/predef/compiler/microtec.h include/msgpack/predef/compiler/mpw.h + include/msgpack/predef/compiler/nvcc.h include/msgpack/predef/compiler/palm.h include/msgpack/predef/compiler/pgi.h include/msgpack/predef/compiler/sgi_mipspro.h @@ -83,12 +85,14 @@ LIST (APPEND msgpackc_HEADERS include/msgpack/predef/hardware/simd/x86_amd.h include/msgpack/predef/hardware/simd/x86_amd/versions.h include/msgpack/predef/language.h + include/msgpack/predef/language/cuda.h include/msgpack/predef/language/objc.h include/msgpack/predef/language/stdc.h include/msgpack/predef/language/stdcpp.h include/msgpack/predef/library.h include/msgpack/predef/library/c.h include/msgpack/predef/library/c/_prefix.h + include/msgpack/predef/library/c/cloudabi.h include/msgpack/predef/library/c/gnu.h include/msgpack/predef/library/c/uc.h include/msgpack/predef/library/c/vms.h @@ -132,16 +136,25 @@ LIST (APPEND msgpackc_HEADERS include/msgpack/predef/os/windows.h include/msgpack/predef/other.h include/msgpack/predef/other/endian.h + include/msgpack/predef/other/workaround.h include/msgpack/predef/platform.h + include/msgpack/predef/platform/cloudabi.h + include/msgpack/predef/platform/ios.h include/msgpack/predef/platform/mingw.h + include/msgpack/predef/platform/mingw32.h + include/msgpack/predef/platform/mingw64.h include/msgpack/predef/platform/windows_desktop.h include/msgpack/predef/platform/windows_phone.h include/msgpack/predef/platform/windows_runtime.h + include/msgpack/predef/platform/windows_server.h include/msgpack/predef/platform/windows_store.h + include/msgpack/predef/platform/windows_system.h + include/msgpack/predef/platform/windows_uwp.h include/msgpack/predef/version.h include/msgpack/predef/version_number.h include/msgpack/sbuffer.h include/msgpack/sysdep.h + include/msgpack/timestamp.h include/msgpack/unpack.h include/msgpack/unpack_define.h include/msgpack/unpack_template.h @@ -173,6 +186,7 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/adaptor/cpp11/array.hpp include/msgpack/adaptor/cpp11/array_char.hpp include/msgpack/adaptor/cpp11/array_unsigned_char.hpp + include/msgpack/adaptor/cpp11/chrono.hpp include/msgpack/adaptor/cpp11/forward_list.hpp include/msgpack/adaptor/cpp11/reference_wrapper.hpp include/msgpack/adaptor/cpp11/shared_ptr.hpp @@ -180,8 +194,11 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/adaptor/cpp11/unique_ptr.hpp include/msgpack/adaptor/cpp11/unordered_map.hpp include/msgpack/adaptor/cpp11/unordered_set.hpp + include/msgpack/adaptor/cpp17/byte.hpp + include/msgpack/adaptor/cpp17/carray_byte.hpp include/msgpack/adaptor/cpp17/optional.hpp include/msgpack/adaptor/cpp17/string_view.hpp + include/msgpack/adaptor/cpp17/vector_byte.hpp include/msgpack/adaptor/define.hpp include/msgpack/adaptor/define_decl.hpp include/msgpack/adaptor/deque.hpp @@ -216,6 +233,8 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/adaptor/vector_unsigned_char.hpp include/msgpack/cpp_config.hpp include/msgpack/cpp_config_decl.hpp + include/msgpack/create_object_visitor.hpp + include/msgpack/create_object_visitor_decl.hpp include/msgpack/fbuffer.hpp include/msgpack/fbuffer_decl.hpp include/msgpack/gcc_atomic.hpp @@ -223,12 +242,16 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/iterator_decl.hpp include/msgpack/meta.hpp include/msgpack/meta_decl.hpp + include/msgpack/null_visitor.hpp + include/msgpack/null_visitor_decl.hpp include/msgpack/object.hpp include/msgpack/object_decl.hpp include/msgpack/object_fwd.hpp include/msgpack/object_fwd_decl.hpp include/msgpack/pack.hpp include/msgpack/pack_decl.hpp + include/msgpack/parse.hpp + include/msgpack/parse_decl.hpp include/msgpack/parse_return.hpp include/msgpack/preprocessor.hpp include/msgpack/preprocessor/arithmetic.hpp @@ -433,6 +456,7 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/preprocessor/seq/detail/binary_transform.hpp include/msgpack/preprocessor/seq/detail/is_empty.hpp include/msgpack/preprocessor/seq/detail/split.hpp + include/msgpack/preprocessor/seq/detail/to_list_msvc.hpp include/msgpack/preprocessor/seq/elem.hpp include/msgpack/preprocessor/seq/enum.hpp include/msgpack/preprocessor/seq/filter.hpp @@ -523,6 +547,7 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/v1/adaptor/cpp11/array.hpp include/msgpack/v1/adaptor/cpp11/array_char.hpp include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp + include/msgpack/v1/adaptor/cpp11/chrono.hpp include/msgpack/v1/adaptor/cpp11/forward_list.hpp include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp @@ -530,8 +555,11 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp include/msgpack/v1/adaptor/cpp11/unordered_map.hpp include/msgpack/v1/adaptor/cpp11/unordered_set.hpp + include/msgpack/v1/adaptor/cpp17/byte.hpp + include/msgpack/v1/adaptor/cpp17/carray_byte.hpp include/msgpack/v1/adaptor/cpp17/optional.hpp include/msgpack/v1/adaptor/cpp17/string_view.hpp + include/msgpack/v1/adaptor/cpp17/vector_byte.hpp include/msgpack/v1/adaptor/define.hpp include/msgpack/v1/adaptor/define_decl.hpp include/msgpack/v1/adaptor/deque.hpp @@ -541,6 +569,7 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp + include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp @@ -632,31 +661,85 @@ IF (MSGPACK_ENABLE_CXX) include/msgpack/v2/adaptor/v4raw_decl.hpp include/msgpack/v2/cpp_config_decl.hpp include/msgpack/v2/create_object_visitor.hpp + include/msgpack/v2/create_object_visitor_decl.hpp include/msgpack/v2/detail/cpp03_zone_decl.hpp include/msgpack/v2/detail/cpp11_zone_decl.hpp include/msgpack/v2/fbuffer_decl.hpp include/msgpack/v2/iterator_decl.hpp include/msgpack/v2/meta_decl.hpp include/msgpack/v2/null_visitor.hpp + include/msgpack/v2/null_visitor_decl.hpp include/msgpack/v2/object.hpp include/msgpack/v2/object_decl.hpp include/msgpack/v2/object_fwd.hpp include/msgpack/v2/object_fwd_decl.hpp include/msgpack/v2/pack_decl.hpp include/msgpack/v2/parse.hpp + include/msgpack/v2/parse_decl.hpp include/msgpack/v2/parse_return.hpp include/msgpack/v2/sbuffer_decl.hpp include/msgpack/v2/unpack.hpp include/msgpack/v2/unpack_decl.hpp include/msgpack/v2/vrefbuffer_decl.hpp include/msgpack/v2/x3_parse.hpp + include/msgpack/v2/x3_parse_decl.hpp include/msgpack/v2/x3_unpack.hpp + include/msgpack/v2/x3_unpack_decl.hpp include/msgpack/v2/zbuffer_decl.hpp include/msgpack/v2/zone_decl.hpp + include/msgpack/v3/adaptor/adaptor_base.hpp + include/msgpack/v3/adaptor/adaptor_base_decl.hpp + include/msgpack/v3/adaptor/array_ref_decl.hpp + include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp + include/msgpack/v3/adaptor/check_container_size_decl.hpp + include/msgpack/v3/adaptor/define_decl.hpp + include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp + include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp + include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp + include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp + include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp + include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp + include/msgpack/v3/adaptor/ext_decl.hpp + include/msgpack/v3/adaptor/fixint_decl.hpp + include/msgpack/v3/adaptor/int_decl.hpp + include/msgpack/v3/adaptor/map_decl.hpp + include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp + include/msgpack/v3/adaptor/nil_decl.hpp + include/msgpack/v3/adaptor/raw_decl.hpp + include/msgpack/v3/adaptor/size_equal_only_decl.hpp + include/msgpack/v3/adaptor/v4raw_decl.hpp + include/msgpack/v3/cpp_config_decl.hpp + include/msgpack/v3/create_object_visitor_decl.hpp + include/msgpack/v3/detail/cpp03_zone_decl.hpp + include/msgpack/v3/detail/cpp11_zone_decl.hpp + include/msgpack/v3/fbuffer_decl.hpp + include/msgpack/v3/iterator_decl.hpp + include/msgpack/v3/meta_decl.hpp + include/msgpack/v3/null_visitor_decl.hpp + include/msgpack/v3/object_decl.hpp + include/msgpack/v3/object_fwd.hpp + include/msgpack/v3/object_fwd_decl.hpp + include/msgpack/v3/pack_decl.hpp + include/msgpack/v3/parse.hpp + include/msgpack/v3/parse_decl.hpp + include/msgpack/v3/parse_return.hpp + include/msgpack/v3/sbuffer_decl.hpp + include/msgpack/v3/unpack.hpp + include/msgpack/v3/unpack_decl.hpp + include/msgpack/v3/vrefbuffer_decl.hpp + include/msgpack/v3/x3_parse_decl.hpp + include/msgpack/v3/x3_unpack.hpp + include/msgpack/v3/x3_unpack_decl.hpp + include/msgpack/v3/zbuffer_decl.hpp + include/msgpack/v3/zone_decl.hpp include/msgpack/version.hpp include/msgpack/versioning.hpp include/msgpack/vrefbuffer.hpp include/msgpack/vrefbuffer_decl.hpp + include/msgpack/x3_parse.hpp + include/msgpack/x3_parse_decl.hpp + include/msgpack/x3_unpack.hpp + include/msgpack/x3_unpack_decl.hpp include/msgpack/zbuffer.hpp include/msgpack/zbuffer_decl.hpp include/msgpack/zone.hpp diff --git a/lib/msgpack-2.1.3/LICENSE_1_0.txt b/lib/msgpack-3.1.1/LICENSE_1_0.txt similarity index 100% rename from lib/msgpack-2.1.3/LICENSE_1_0.txt rename to lib/msgpack-3.1.1/LICENSE_1_0.txt diff --git a/lib/msgpack-2.1.3/NEWS b/lib/msgpack-3.1.1/NEWS similarity index 100% rename from lib/msgpack-2.1.3/NEWS rename to lib/msgpack-3.1.1/NEWS diff --git a/lib/msgpack-2.1.3/NOTICE b/lib/msgpack-3.1.1/NOTICE similarity index 100% rename from lib/msgpack-2.1.3/NOTICE rename to lib/msgpack-3.1.1/NOTICE diff --git a/lib/msgpack-2.1.3/README b/lib/msgpack-3.1.1/README similarity index 82% rename from lib/msgpack-2.1.3/README rename to lib/msgpack-3.1.1/README index 30d9c87fe92..6a8528c9e37 100644 --- a/lib/msgpack-2.1.3/README +++ b/lib/msgpack-3.1.1/README @@ -1,9 +1,9 @@ `msgpack` for C/C++ =================== -Version 2.1.1 [![Build Status](https://travis-ci.org/msgpack/msgpack-c.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-c) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master) +Version 3.1.1 [![Build Status](https://travis-ci.org/msgpack/msgpack-c.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-c) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master) -It's like JSON but small and fast. +It's like JSON but smaller and faster. Overview -------- @@ -11,7 +11,7 @@ Overview [MessagePack](http://msgpack.org/) is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. Small integers are encoded into a -single byte while typical short strings require only one extra byte in +single byte and short strings require only one extra byte in addition to the strings themselves. Example @@ -97,6 +97,10 @@ int main(void) msgpack::type::tuple dst; deserialized.convert(dst); + // or create the new instance + msgpack::type::tuple dst2 = + deserialized.as >(); + return 0; } ``` @@ -108,7 +112,7 @@ Usage ### C++ Header Only Library -When you use msgpack on C++03 and C++11, you can just add +When you use msgpack on C++, you can just add msgpack-c/include to your include path: g++ -I msgpack-c/include your_source_file.cpp @@ -135,14 +139,18 @@ C and C++03: $ make $ sudo make install -If you want to setup C++11 version of msgpack instead, +If you want to setup C++11 or C++17 version of msgpack instead, execute the following commands: $ git clone https://github.com/msgpack/msgpack-c.git $ cd msgpack-c - $ cmake -DMSGPACK_CXX11=ON . + $ cmake -DMSGPACK_CXX[11|17]=ON . $ sudo make install +`MSGPACK_CXX[11|17]` flags are not affected to installing files. Just switching test cases. All files are installed in every settings. + +When you use the C part of `msgpack-c`, you need to build and link the library. By default, both static/shared libraries are built. If you want to build only static library, set `BUILD_SHARED_LIBS=OFF` to cmake. If you want to build only shared library, set `BUILD_SHARED_L + #### GUI on Windows Clone msgpack-c git repository. @@ -170,7 +178,7 @@ the binaries:' text box. ### Documentation -You can get addtional information on the +You can get additional information including the tutorial on the [wiki](https://github.com/msgpack/msgpack-c/wiki). Contributing diff --git a/lib/msgpack-2.1.3/README.md b/lib/msgpack-3.1.1/README.md similarity index 82% rename from lib/msgpack-2.1.3/README.md rename to lib/msgpack-3.1.1/README.md index 08613b113cf..6a8528c9e37 100644 --- a/lib/msgpack-2.1.3/README.md +++ b/lib/msgpack-3.1.1/README.md @@ -1,9 +1,9 @@ `msgpack` for C/C++ =================== -Version 2.1.3 [![Build Status](https://travis-ci.org/msgpack/msgpack-c.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-c) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master) +Version 3.1.1 [![Build Status](https://travis-ci.org/msgpack/msgpack-c.svg?branch=master)](https://travis-ci.org/msgpack/msgpack-c) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master) -It's like JSON but small and fast. +It's like JSON but smaller and faster. Overview -------- @@ -11,7 +11,7 @@ Overview [MessagePack](http://msgpack.org/) is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. Small integers are encoded into a -single byte while typical short strings require only one extra byte in +single byte and short strings require only one extra byte in addition to the strings themselves. Example @@ -97,6 +97,10 @@ int main(void) msgpack::type::tuple dst; deserialized.convert(dst); + // or create the new instance + msgpack::type::tuple dst2 = + deserialized.as >(); + return 0; } ``` @@ -108,7 +112,7 @@ Usage ### C++ Header Only Library -When you use msgpack on C++03 and C++11, you can just add +When you use msgpack on C++, you can just add msgpack-c/include to your include path: g++ -I msgpack-c/include your_source_file.cpp @@ -135,14 +139,18 @@ C and C++03: $ make $ sudo make install -If you want to setup C++11 version of msgpack instead, +If you want to setup C++11 or C++17 version of msgpack instead, execute the following commands: $ git clone https://github.com/msgpack/msgpack-c.git $ cd msgpack-c - $ cmake -DMSGPACK_CXX11=ON . + $ cmake -DMSGPACK_CXX[11|17]=ON . $ sudo make install +`MSGPACK_CXX[11|17]` flags are not affected to installing files. Just switching test cases. All files are installed in every settings. + +When you use the C part of `msgpack-c`, you need to build and link the library. By default, both static/shared libraries are built. If you want to build only static library, set `BUILD_SHARED_LIBS=OFF` to cmake. If you want to build only shared library, set `BUILD_SHARED_L + #### GUI on Windows Clone msgpack-c git repository. @@ -170,7 +178,7 @@ the binaries:' text box. ### Documentation -You can get addtional information on the +You can get additional information including the tutorial on the [wiki](https://github.com/msgpack/msgpack-c/wiki). Contributing diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_define_array.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_define_array.hpp.erb similarity index 97% rename from lib/msgpack-2.1.3/erb/v1/cpp03_define_array.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_define_array.hpp.erb index cd25214e916..6e3c3c0fedb 100644 --- a/lib/msgpack-2.1.3/erb/v1/cpp03_define_array.hpp.erb +++ b/lib/msgpack-3.1.1/erb/v1/cpp03_define_array.hpp.erb @@ -75,7 +75,7 @@ struct define_array, A<%=j%><%}%>> { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*<%=i+1%>)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*<%=i+1%>, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = <%=i+1%>; <%0.upto(i) {|j|%> o->via.array.ptr[<%=j%>] = msgpack::object(a<%=j%>, z);<%}%> diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_define_array_decl.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_define_array_decl.hpp.erb similarity index 100% rename from lib/msgpack-2.1.3/erb/v1/cpp03_define_array_decl.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_define_array_decl.hpp.erb diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_define_map.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_define_map.hpp.erb similarity index 94% rename from lib/msgpack-2.1.3/erb/v1/cpp03_define_map.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_define_map.hpp.erb index f7460554d3e..a7b01fa2e7d 100644 --- a/lib/msgpack-2.1.3/erb/v1/cpp03_define_map.hpp.erb +++ b/lib/msgpack-3.1.1/erb/v1/cpp03_define_map.hpp.erb @@ -61,6 +61,7 @@ struct define_map, A<%=j%><%}%>> { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -82,7 +83,7 @@ struct define_map, A<%=j%><%}%>> { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*<%=(i+1)/2%>)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*<%=(i+1)/2%>, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = <%=(i+1)/2%>; <%0.step(i,2) {|j|%> o->via.map.ptr[<%=j/2%>].key = msgpack::object(a<%=j%>, z); diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_define_map_decl.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_define_map_decl.hpp.erb similarity index 100% rename from lib/msgpack-2.1.3/erb/v1/cpp03_define_map_decl.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_define_map_decl.hpp.erb diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_msgpack_tuple.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_msgpack_tuple.hpp.erb similarity index 98% rename from lib/msgpack-2.1.3/erb/v1/cpp03_msgpack_tuple.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_msgpack_tuple.hpp.erb index 3cf624b7f63..c4b4a9f7244 100644 --- a/lib/msgpack-2.1.3/erb/v1/cpp03_msgpack_tuple.hpp.erb +++ b/lib/msgpack-3.1.1/erb/v1/cpp03_msgpack_tuple.hpp.erb @@ -207,7 +207,7 @@ struct object_with_zone, A<%=j%><%}%>> > { msgpack::object::with_zone& o, const type::tuple, A<%=j%><%}%>>& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*<%=i+1%>)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*<%=i+1%>, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = <%=i+1%>; <%0.upto(i) {|j|%> o.via.array.ptr[<%=j%>] = msgpack::object(v.template get<<%=j%>>(), o.zone);<%}%> diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb similarity index 100% rename from lib/msgpack-2.1.3/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_zone.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_zone.hpp.erb similarity index 90% rename from lib/msgpack-2.1.3/erb/v1/cpp03_zone.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_zone.hpp.erb index ad74b7d6e0c..78f60913568 100644 --- a/lib/msgpack-2.1.3/erb/v1/cpp03_zone.hpp.erb +++ b/lib/msgpack-3.1.1/erb/v1/cpp03_zone.hpp.erb @@ -178,7 +178,9 @@ private: template static void object_delete(void* obj); - void* allocate_expand(size_t size); + static char* get_aligned(char* ptr, size_t align); + + char* allocate_expand(size_t size); private: zone(const zone&); zone& operator=(const zone&); @@ -188,37 +190,42 @@ inline zone::zone(size_t chunk_size) /* throw() */ :m_chunk_size(chunk_size), m_ { } -inline void* zone::allocate_align(size_t size, size_t align) +inline char* zone::get_aligned(char* ptr, size_t align) { - char* aligned = + return reinterpret_cast( reinterpret_cast( - (m_chunk_list.m_ptr + (align - 1))) / align * align); + (ptr + (align - 1))) / align * align); +} + +inline void* zone::allocate_align(size_t size, size_t align) +{ + char* aligned = get_aligned(m_chunk_list.m_ptr, align); size_t adjusted_size = size + (aligned - m_chunk_list.m_ptr); - if(m_chunk_list.m_free >= adjusted_size) { - m_chunk_list.m_free -= adjusted_size; - m_chunk_list.m_ptr += adjusted_size; - return aligned; + if (m_chunk_list.m_free < adjusted_size) { + size_t enough_size = size + align - 1; + char* ptr = allocate_expand(enough_size); + aligned = get_aligned(ptr, align); + adjusted_size = size + (aligned - m_chunk_list.m_ptr); } - return reinterpret_cast( - reinterpret_cast( - allocate_expand(size + (align - 1))) / align * align); + m_chunk_list.m_free -= adjusted_size; + m_chunk_list.m_ptr += adjusted_size; + return aligned; } inline void* zone::allocate_no_align(size_t size) { + char* ptr = m_chunk_list.m_ptr; if(m_chunk_list.m_free < size) { - return allocate_expand(size); + ptr = allocate_expand(size); } - - char* ptr = m_chunk_list.m_ptr; m_chunk_list.m_free -= size; m_chunk_list.m_ptr += size; return ptr; } -inline void* zone::allocate_expand(size_t size) +inline char* zone::allocate_expand(size_t size) { chunk_list* const cl = &m_chunk_list; @@ -240,8 +247,8 @@ inline void* zone::allocate_expand(size_t size) c->m_next = cl->m_head; cl->m_head = c; - cl->m_free = sz - size; - cl->m_ptr = ptr + size; + cl->m_free = sz; + cl->m_ptr = ptr; return ptr; } @@ -300,7 +307,7 @@ inline std::size_t aligned_size( template , typename A<%=j%><%}%>> T* zone::allocate(<%=(1..i).map{|j|"A#{j} a#{j}"}.join(', ')%>) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { diff --git a/lib/msgpack-2.1.3/erb/v1/cpp03_zone_decl.hpp.erb b/lib/msgpack-3.1.1/erb/v1/cpp03_zone_decl.hpp.erb similarity index 79% rename from lib/msgpack-2.1.3/erb/v1/cpp03_zone_decl.hpp.erb rename to lib/msgpack-3.1.1/erb/v1/cpp03_zone_decl.hpp.erb index ce9693663c3..7881065abee 100644 --- a/lib/msgpack-2.1.3/erb/v1/cpp03_zone_decl.hpp.erb +++ b/lib/msgpack-3.1.1/erb/v1/cpp03_zone_decl.hpp.erb @@ -24,6 +24,14 @@ #define MSGPACK_ZONE_ALIGN sizeof(void*) #endif +#if defined(_MSC_VER) +#define MSGPACK_ZONE_ALIGNOF(type) __alignof(type) +#else +#define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type) +#endif +// For a compiler that doesn't support __alignof__: +// #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN + <% GENERATION_LIMIT = 15 %> namespace msgpack { diff --git a/lib/msgpack-2.1.3/include/msgpack.h b/lib/msgpack-3.1.1/include/msgpack.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack.h rename to lib/msgpack-3.1.1/include/msgpack.h diff --git a/lib/msgpack-2.1.3/include/msgpack.hpp b/lib/msgpack-3.1.1/include/msgpack.hpp similarity index 79% rename from lib/msgpack-2.1.3/include/msgpack.hpp rename to lib/msgpack-3.1.1/include/msgpack.hpp index c793ab6b6b6..74ae1f6635a 100644 --- a/lib/msgpack-2.1.3/include/msgpack.hpp +++ b/lib/msgpack-3.1.1/include/msgpack.hpp @@ -11,7 +11,11 @@ #include "msgpack/iterator.hpp" #include "msgpack/zone.hpp" #include "msgpack/pack.hpp" +#include "msgpack/null_visitor.hpp" +#include "msgpack/parse.hpp" #include "msgpack/unpack.hpp" +#include "msgpack/x3_parse.hpp" +#include "msgpack/x3_unpack.hpp" #include "msgpack/sbuffer.hpp" #include "msgpack/vrefbuffer.hpp" #include "msgpack/version.hpp" diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base.hpp index 88257ed5137..4cf4fd4451e 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base.hpp @@ -14,5 +14,6 @@ #include "msgpack/v1/adaptor/adaptor_base.hpp" #include "msgpack/v2/adaptor/adaptor_base.hpp" +#include "msgpack/v3/adaptor/adaptor_base.hpp" #endif // MSGPACK_ADAPTOR_BASE_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base_decl.hpp similarity index 90% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base_decl.hpp index b1526ca5677..753cfb91e25 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/adaptor_base_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/adaptor_base_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/adaptor_base_decl.hpp" #include "msgpack/v2/adaptor/adaptor_base_decl.hpp" +#include "msgpack/v3/adaptor/adaptor_base_decl.hpp" #endif // MSGPACK_ADAPTOR_BASE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/array_ref.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/array_ref.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/array_ref.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/array_ref.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/array_ref_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/array_ref_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/array_ref_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/array_ref_decl.hpp index 2cb1ace7bc4..43eaa98d71d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/array_ref_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/array_ref_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/array_ref_decl.hpp" #include "msgpack/v2/adaptor/array_ref_decl.hpp" +#include "msgpack/v3/adaptor/array_ref_decl.hpp" #endif // MSGPACK_TYPE_ARRAY_REF_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/bool.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/bool.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/bool.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/bool.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/fusion.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/fusion.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/fusion.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/fusion.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/msgpack_variant.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/msgpack_variant.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/msgpack_variant.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/msgpack_variant.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp similarity index 89% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp index 64bf98f1f7a..ada6c913b3b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp" #include "msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp" +#include "msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp" #endif // MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/optional.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/optional.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/optional.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/optional.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/string_ref.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/string_ref.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/string_ref.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/string_ref.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/boost/string_view.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/boost/string_view.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/boost/string_view.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/boost/string_view.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/carray.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/carray.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/carray.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/carray.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/char_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/char_ptr.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/char_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/char_ptr.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/check_container_size.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/check_container_size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/check_container_size.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/check_container_size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/check_container_size_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/check_container_size_decl.hpp similarity index 89% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/check_container_size_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/check_container_size_decl.hpp index 73518226a73..e61334af73c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/check_container_size_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/check_container_size_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/check_container_size_decl.hpp" #include "msgpack/v2/adaptor/check_container_size_decl.hpp" +#include "msgpack/v3/adaptor/check_container_size_decl.hpp" #endif // MSGPACK_CHECK_CONTAINER_SIZE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array_char.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array_char.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array_char.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/chrono.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/chrono.hpp new file mode 100644 index 00000000000..48d93974573 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/chrono.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_TYPE_CPP11_CHRONO_HPP +#define MSGPACK_TYPE_CPP11_CHRONO_HPP + +#include "msgpack/v1/adaptor/cpp11/chrono.hpp" + +#endif // MSGPACK_TYPE_CPP11_CHRONO_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/forward_list.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/forward_list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/forward_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/forward_list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/reference_wrapper.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/reference_wrapper.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/reference_wrapper.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/reference_wrapper.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/shared_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/shared_ptr.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/shared_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/shared_ptr.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unique_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unique_ptr.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unique_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unique_ptr.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unordered_map.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unordered_map.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unordered_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unordered_map.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unordered_set.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unordered_set.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp11/unordered_set.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp11/unordered_set.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/byte.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/byte.hpp new file mode 100644 index 00000000000..eebaa960303 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/byte.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_TYPE_CPP17_BYTE_HPP +#define MSGPACK_TYPE_CPP17_BYTE_HPP + +#include "msgpack/v1/adaptor/cpp17/byte.hpp" + +#endif // MSGPACK_TYPE_CPP17_BYTE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/carray_byte.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/carray_byte.hpp new file mode 100644 index 00000000000..c41bccac774 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/carray_byte.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP +#define MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP + +#include "msgpack/v1/adaptor/cpp17/carray_byte.hpp" + +#endif // MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp17/optional.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/optional.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp17/optional.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/optional.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/cpp17/string_view.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/string_view.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/cpp17/string_view.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/string_view.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/vector_byte.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/vector_byte.hpp new file mode 100644 index 00000000000..8c5e6230a91 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/cpp17/vector_byte.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP +#define MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP + +#include "msgpack/v1/adaptor/cpp17/vector_byte.hpp" + +#endif // MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/define.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/define.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/define.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/define.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/define_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/define_decl.hpp similarity index 69% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/define_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/define_decl.hpp index d25363ccf72..1880a861650 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/define_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/define_decl.hpp @@ -27,18 +27,18 @@ #define MSGPACK_DEFINE_ARRAY(...) \ template \ - void msgpack_pack(Packer& pk) const \ + void msgpack_pack(Packer& msgpack_pk) const \ { \ - msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(pk); \ + msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(msgpack_pk); \ } \ - void msgpack_unpack(msgpack::object const& o) \ + void msgpack_unpack(msgpack::object const& msgpack_o) \ { \ - msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(o); \ + msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(msgpack_o); \ }\ template \ - void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \ + void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \ { \ - msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(o, z); \ + msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(msgpack_o, msgpack_z); \ } #define MSGPACK_BASE_ARRAY(base) (*const_cast(static_cast(this))) @@ -62,24 +62,24 @@ #define MSGPACK_DEFINE_MAP(...) \ template \ - void msgpack_pack(Packer& pk) const \ + void msgpack_pack(Packer& msgpack_pk) const \ { \ msgpack::type::make_define_map \ MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ - .msgpack_pack(pk); \ + .msgpack_pack(msgpack_pk); \ } \ - void msgpack_unpack(msgpack::object const& o) \ + void msgpack_unpack(msgpack::object const& msgpack_o) \ { \ msgpack::type::make_define_map \ MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ - .msgpack_unpack(o); \ + .msgpack_unpack(msgpack_o); \ }\ template \ - void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \ + void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \ { \ msgpack::type::make_define_map \ MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \ - .msgpack_object(o, z); \ + .msgpack_object(msgpack_o, msgpack_z); \ } #define MSGPACK_BASE_MAP(base) \ @@ -94,32 +94,32 @@ namespace adaptor { \ template<> \ struct convert { \ - msgpack::object const& operator()(msgpack::object const& o, enum_name& v) const { \ + msgpack::object const& operator()(msgpack::object const& msgpack_o, enum_name& msgpack_v) const { \ msgpack::underlying_type::type tmp; \ - msgpack::operator>>(o, tmp); \ - v = static_cast(tmp); \ - return o; \ + msgpack::operator>>(msgpack_o, tmp); \ + msgpack_v = static_cast(tmp); \ + return msgpack_o; \ } \ }; \ template<> \ struct object { \ - void operator()(msgpack::object& o, const enum_name& v) const { \ - msgpack::underlying_type::type tmp = static_cast::type>(v); \ - msgpack::operator<<(o, tmp); \ + void operator()(msgpack::object& msgpack_o, const enum_name& msgpack_v) const { \ + msgpack::underlying_type::type tmp = static_cast::type>(msgpack_v); \ + msgpack::operator<<(msgpack_o, tmp); \ } \ }; \ template<> \ struct object_with_zone { \ - void operator()(msgpack::object::with_zone& o, const enum_name& v) const { \ - msgpack::underlying_type::type tmp = static_cast::type>(v); \ - msgpack::operator<<(o, tmp); \ + void operator()(msgpack::object::with_zone& msgpack_o, const enum_name& msgpack_v) const { \ + msgpack::underlying_type::type tmp = static_cast::type>(msgpack_v); \ + msgpack::operator<<(msgpack_o, tmp); \ } \ }; \ template <> \ struct pack { \ template \ - msgpack::packer& operator()(msgpack::packer& o, const enum_name& v) const { \ - return msgpack::operator<<(o, static_cast::type>(v)); \ + msgpack::packer& operator()(msgpack::packer& msgpack_o, const enum_name& msgpack_v) const { \ + return msgpack::operator<<(msgpack_o, static_cast::type>(msgpack_v)); \ } \ }; \ } \ @@ -139,5 +139,6 @@ #include "msgpack/v1/adaptor/define_decl.hpp" #include "msgpack/v2/adaptor/define_decl.hpp" +#include "msgpack/v3/adaptor/define_decl.hpp" #endif // MSGPACK_DEFINE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/deque.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/deque.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/deque.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/deque.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/ext.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/ext.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/ext.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/ext.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/ext_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/ext_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/ext_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/ext_decl.hpp index 29bfd6174ec..7da30427be4 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/ext_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/ext_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/ext_decl.hpp" #include "msgpack/v2/adaptor/ext_decl.hpp" +#include "msgpack/v3/adaptor/ext_decl.hpp" #endif // MSGPACK_TYPE_EXT_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/fixint.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/fixint.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/fixint.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/fixint.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/fixint_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/fixint_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/fixint_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/fixint_decl.hpp index 999fdd612c8..3e73ded2589 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/fixint_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/fixint_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/fixint_decl.hpp" #include "msgpack/v2/adaptor/fixint_decl.hpp" +#include "msgpack/v3/adaptor/fixint_decl.hpp" #endif // MSGPACK_TYPE_FIXINT_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/float.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/float.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/float.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/float.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/int.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/int.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/int.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/int.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/int_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/int_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/int_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/int_decl.hpp index cb5e3498a34..f68ef8bc051 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/int_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/int_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/int_decl.hpp" #include "msgpack/v2/adaptor/int_decl.hpp" +#include "msgpack/v3/adaptor/int_decl.hpp" #endif // MSGPACK_TYPE_INT_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/list.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/list.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/map.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/map.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/map.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/map.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/map_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/map_decl.hpp index 2ce545f72f1..757688ec4f7 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/map_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/map_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/map_decl.hpp" #include "msgpack/v2/adaptor/map_decl.hpp" +#include "msgpack/v3/adaptor/map_decl.hpp" #endif // MSGPACK_TYPE_MAP_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/msgpack_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/msgpack_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/msgpack_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/msgpack_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/msgpack_tuple_decl.hpp similarity index 90% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/msgpack_tuple_decl.hpp index 2892b14f4c9..0c70b22654d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/msgpack_tuple_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/msgpack_tuple_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/msgpack_tuple_decl.hpp" #include "msgpack/v2/adaptor/msgpack_tuple_decl.hpp" +#include "msgpack/v3/adaptor/msgpack_tuple_decl.hpp" #endif // MSGPACK_MSGPACK_TUPLE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/nil.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/nil.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/nil.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/nil.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/nil_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/nil_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/nil_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/nil_decl.hpp index a5bdf436576..d45f45bb9f9 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/nil_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/nil_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/nil_decl.hpp" #include "msgpack/v2/adaptor/nil_decl.hpp" +#include "msgpack/v3/adaptor/nil_decl.hpp" #endif // MSGPACK_TYPE_NIL_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/pair.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/pair.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/pair.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/pair.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/raw.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/raw.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/raw.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/raw.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/raw_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/raw_decl.hpp index eb3b96b8c62..60777bddcc1 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/raw_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/raw_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/raw_decl.hpp" #include "msgpack/v2/adaptor/raw_decl.hpp" +#include "msgpack/v3/adaptor/raw_decl.hpp" #endif // MSGPACK_TYPE_RAW_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/set.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/set.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/set.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/set.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/size_equal_only.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/size_equal_only.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/size_equal_only.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/size_equal_only.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/size_equal_only_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/size_equal_only_decl.hpp similarity index 90% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/size_equal_only_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/size_equal_only_decl.hpp index 3735d16d8a0..d3e5dcf7591 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/size_equal_only_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/size_equal_only_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/size_equal_only_decl.hpp" #include "msgpack/v2/adaptor/size_equal_only_decl.hpp" +#include "msgpack/v3/adaptor/size_equal_only_decl.hpp" #endif // MSGPACK_TYPE_SIZE_EQUAL_ONLY_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/string.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/string.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/string.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/string.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_map.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_map.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_map.hpp index 62e77c11f9f..9c8190e855c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_map.hpp @@ -84,7 +84,7 @@ struct object_with_zone o.via.map.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; @@ -141,7 +141,7 @@ struct object_with_zone(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_set.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_set.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_set.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_set.hpp index fcc76f3f00e..dd6c0448fc6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/tr1/unordered_set.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/tr1/unordered_set.hpp @@ -82,7 +82,7 @@ struct object_with_zone o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; @@ -136,7 +136,7 @@ struct object_with_zone(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/v4raw.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/v4raw.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/v4raw.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/v4raw.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/v4raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/v4raw_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/v4raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/v4raw_decl.hpp index 5e591df0191..98935183229 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/v4raw_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/adaptor/v4raw_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/adaptor/v4raw_decl.hpp" #include "msgpack/v2/adaptor/v4raw_decl.hpp" +#include "msgpack/v3/adaptor/v4raw_decl.hpp" #endif // MSGPACK_TYPE_V4RAW_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/vector.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/vector.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/vector.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/vector.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/vector_bool.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/vector_bool.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/vector_bool.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/vector_bool.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/vector_char.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/vector_char.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/vector_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/vector_char.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/vector_unsigned_char.hpp b/lib/msgpack-3.1.1/include/msgpack/adaptor/vector_unsigned_char.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/vector_unsigned_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/adaptor/vector_unsigned_char.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/cpp_config.hpp b/lib/msgpack-3.1.1/include/msgpack/cpp_config.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/cpp_config.hpp rename to lib/msgpack-3.1.1/include/msgpack/cpp_config.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/cpp_config_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/cpp_config_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/cpp_config_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/cpp_config_decl.hpp index 70179c09216..332e2a81f38 100644 --- a/lib/msgpack-2.1.3/include/msgpack/cpp_config_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/cpp_config_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/cpp_config_decl.hpp" #include "msgpack/v2/cpp_config_decl.hpp" +#include "msgpack/v3/cpp_config_decl.hpp" #endif // MSGPACK_CPP_CONFIG_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/create_object_visitor.hpp b/lib/msgpack-3.1.1/include/msgpack/create_object_visitor.hpp new file mode 100644 index 00000000000..40d69974a78 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/create_object_visitor.hpp @@ -0,0 +1,17 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_CREATE_OBJECT_VISITOR_HPP +#define MSGPACK_CREATE_OBJECT_VISITOR_HPP + +#include "msgpack/create_object_visitor_decl.hpp" + +#include "msgpack/v2/create_object_visitor.hpp" + +#endif // MSGPACK_CREATE_OBJECT_VISITOR_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/create_object_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/create_object_visitor_decl.hpp new file mode 100644 index 00000000000..56e81e1bbec --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/create_object_visitor_decl.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP +#define MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP + +#include "msgpack/v2/create_object_visitor_decl.hpp" +#include "msgpack/v3/create_object_visitor_decl.hpp" + +#endif // MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/fbuffer.h b/lib/msgpack-3.1.1/include/msgpack/fbuffer.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/fbuffer.h rename to lib/msgpack-3.1.1/include/msgpack/fbuffer.h diff --git a/lib/msgpack-2.1.3/include/msgpack/fbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/fbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/fbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/fbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/fbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/fbuffer_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/fbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/fbuffer_decl.hpp index a630ed08955..d1a5a6a52fc 100644 --- a/lib/msgpack-2.1.3/include/msgpack/fbuffer_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/fbuffer_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/fbuffer_decl.hpp" #include "msgpack/v2/fbuffer_decl.hpp" +#include "msgpack/v3/fbuffer_decl.hpp" #endif // MSGPACK_FBUFFER_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/gcc_atomic.h b/lib/msgpack-3.1.1/include/msgpack/gcc_atomic.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/gcc_atomic.h rename to lib/msgpack-3.1.1/include/msgpack/gcc_atomic.h diff --git a/lib/msgpack-2.1.3/include/msgpack/gcc_atomic.hpp b/lib/msgpack-3.1.1/include/msgpack/gcc_atomic.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/gcc_atomic.hpp rename to lib/msgpack-3.1.1/include/msgpack/gcc_atomic.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/iterator.hpp b/lib/msgpack-3.1.1/include/msgpack/iterator.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/iterator.hpp rename to lib/msgpack-3.1.1/include/msgpack/iterator.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/iterator_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/iterator_decl.hpp similarity index 84% rename from lib/msgpack-2.1.3/include/msgpack/iterator_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/iterator_decl.hpp index 8835e58e6c8..5bf28cb10ee 100644 --- a/lib/msgpack-2.1.3/include/msgpack/iterator_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/iterator_decl.hpp @@ -13,5 +13,6 @@ #include #include +#include -#endif // MSGPACK_V1_ITERATOR_DECL_HPP +#endif // MSGPACK_ITERATOR_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/meta.hpp b/lib/msgpack-3.1.1/include/msgpack/meta.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/meta.hpp rename to lib/msgpack-3.1.1/include/msgpack/meta.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/meta_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/meta_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/meta_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/meta_decl.hpp index c574c13f83b..54380f8c836 100644 --- a/lib/msgpack-2.1.3/include/msgpack/meta_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/meta_decl.hpp @@ -13,5 +13,6 @@ #include "msgpack/v1/meta_decl.hpp" #include "msgpack/v2/meta_decl.hpp" +#include "msgpack/v3/meta_decl.hpp" #endif // MSGPACK_META_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/null_visitor.hpp b/lib/msgpack-3.1.1/include/msgpack/null_visitor.hpp new file mode 100644 index 00000000000..523d0dd1922 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/null_visitor.hpp @@ -0,0 +1,17 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_NULL_VISITOR_HPP +#define MSGPACK_NULL_VISITOR_HPP + +#include "msgpack/null_visitor_decl.hpp" + +#include "msgpack/v2/null_visitor.hpp" + +#endif // MSGPACK_NULL_VISITOR_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/null_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/null_visitor_decl.hpp new file mode 100644 index 00000000000..b398ed245eb --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/null_visitor_decl.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_NULL_VISITOR_DECL_HPP +#define MSGPACK_NULL_VISITOR_DECL_HPP + +#include "msgpack/v2/null_visitor_decl.hpp" +#include "msgpack/v3/null_visitor_decl.hpp" + +#endif // MSGPACK_NULL_VISITOR_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/object.h b/lib/msgpack-3.1.1/include/msgpack/object.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/object.h rename to lib/msgpack-3.1.1/include/msgpack/object.h diff --git a/lib/msgpack-2.1.3/include/msgpack/object.hpp b/lib/msgpack-3.1.1/include/msgpack/object.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/object.hpp rename to lib/msgpack-3.1.1/include/msgpack/object.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/object_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/object_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/object_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/object_decl.hpp index d1b46345395..7aab1288da2 100644 --- a/lib/msgpack-2.1.3/include/msgpack/object_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/object_decl.hpp @@ -13,5 +13,6 @@ #include "msgpack/v1/object_decl.hpp" #include "msgpack/v2/object_decl.hpp" +#include "msgpack/v3/object_decl.hpp" #endif // MSGPACK_OBJECT_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/object_fwd.hpp b/lib/msgpack-3.1.1/include/msgpack/object_fwd.hpp similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/object_fwd.hpp rename to lib/msgpack-3.1.1/include/msgpack/object_fwd.hpp index 17a7c6e48a6..515df9dc6cf 100644 --- a/lib/msgpack-2.1.3/include/msgpack/object_fwd.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/object_fwd.hpp @@ -15,5 +15,6 @@ #include "msgpack/v1/object_fwd.hpp" #include "msgpack/v2/object_fwd.hpp" +#include "msgpack/v3/object_fwd.hpp" #endif // MSGPACK_OBJECT_FWD_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/object_fwd_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/object_fwd_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/object_fwd_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/object_fwd_decl.hpp index 70e10a5ca1d..c933c34516a 100644 --- a/lib/msgpack-2.1.3/include/msgpack/object_fwd_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/object_fwd_decl.hpp @@ -13,5 +13,6 @@ #include "msgpack/v1/object_fwd_decl.hpp" #include "msgpack/v2/object_fwd_decl.hpp" +#include "msgpack/v3/object_fwd_decl.hpp" #endif // MSGPACK_OBJECT_FWD_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/pack.h b/lib/msgpack-3.1.1/include/msgpack/pack.h similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/pack.h rename to lib/msgpack-3.1.1/include/msgpack/pack.h index 2c7120fd79e..f2dddb3c5fb 100644 --- a/lib/msgpack-2.1.3/include/msgpack/pack.h +++ b/lib/msgpack-3.1.1/include/msgpack/pack.h @@ -12,6 +12,7 @@ #include "pack_define.h" #include "object.h" +#include "timestamp.h" #include #ifdef __cplusplus @@ -98,6 +99,9 @@ static int msgpack_pack_bin_body(msgpack_packer* pk, const void* b, size_t l); static int msgpack_pack_ext(msgpack_packer* pk, size_t l, int8_t type); static int msgpack_pack_ext_body(msgpack_packer* pk, const void* b, size_t l); +static int msgpack_pack_timestamp(msgpack_packer* pk, const msgpack_timestamp* d); + +MSGPACK_DLLEXPORT int msgpack_pack_object(msgpack_packer* pk, msgpack_object d); diff --git a/lib/msgpack-2.1.3/include/msgpack/pack.hpp b/lib/msgpack-3.1.1/include/msgpack/pack.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/pack.hpp rename to lib/msgpack-3.1.1/include/msgpack/pack.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/pack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/pack_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/pack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/pack_decl.hpp index 39ffa7729f2..5aaec94a859 100644 --- a/lib/msgpack-2.1.3/include/msgpack/pack_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/pack_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/pack_decl.hpp" #include "msgpack/v2/pack_decl.hpp" +#include "msgpack/v3/pack_decl.hpp" #endif // MSGPACK_PACK_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/pack_define.h b/lib/msgpack-3.1.1/include/msgpack/pack_define.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/pack_define.h rename to lib/msgpack-3.1.1/include/msgpack/pack_define.h diff --git a/lib/msgpack-2.1.3/include/msgpack/pack_template.h b/lib/msgpack-3.1.1/include/msgpack/pack_template.h similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/pack_template.h rename to lib/msgpack-3.1.1/include/msgpack/pack_template.h index 17abb521eca..5e2313cb2d1 100644 --- a/lib/msgpack-2.1.3/include/msgpack/pack_template.h +++ b/lib/msgpack-3.1.1/include/msgpack/pack_template.h @@ -890,6 +890,34 @@ msgpack_pack_inline_func(_ext_body)(msgpack_pack_user x, const void* b, size_t l msgpack_pack_append_buffer(x, (const unsigned char*)b, l); } +msgpack_pack_inline_func(_timestamp)(msgpack_pack_user x, const msgpack_timestamp* d) +{ + if ((((int64_t)d->tv_sec) >> 34) == 0) { + uint64_t data64 = ((uint64_t) d->tv_nsec << 34) | d->tv_sec; + if ((data64 & 0xffffffff00000000L) == 0) { + // timestamp 32 + char buf[4]; + uint32_t data32 = (uint32_t)data64; + msgpack_pack_ext(x, 4, -1); + _msgpack_store32(buf, data32); + msgpack_pack_append_buffer(x, buf, 4); + } else { + // timestamp 64 + char buf[8]; + msgpack_pack_ext(x, 8, -1); + _msgpack_store64(buf, data64); + msgpack_pack_append_buffer(x, buf, 8); + } + } else { + // timestamp 96 + char buf[12]; + _msgpack_store32(&buf[0], d->tv_nsec); + _msgpack_store64(&buf[4], d->tv_sec); + msgpack_pack_ext(x, 12, -1); + msgpack_pack_append_buffer(x, buf, 12); + } +} + #undef msgpack_pack_inline_func #undef msgpack_pack_user #undef msgpack_pack_append_buffer diff --git a/lib/msgpack-3.1.1/include/msgpack/parse.hpp b/lib/msgpack-3.1.1/include/msgpack/parse.hpp new file mode 100644 index 00000000000..90e140276fc --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/parse.hpp @@ -0,0 +1,18 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_PARSE_HPP +#define MSGPACK_PARSE_HPP + +#include "msgpack/parse_decl.hpp" + +#include "msgpack/v2/parse.hpp" +#include "msgpack/v3/parse.hpp" + +#endif // MSGPACK_PARSE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/parse_decl.hpp new file mode 100644 index 00000000000..381aa1a4ffd --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/parse_decl.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_PARSE_DECL_HPP +#define MSGPACK_PARSE_DECL_HPP + +#include "msgpack/v2/parse_decl.hpp" +#include "msgpack/v3/parse_decl.hpp" + +#endif // MSGPACK_PARSE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/parse_return.hpp b/lib/msgpack-3.1.1/include/msgpack/parse_return.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/parse_return.hpp rename to lib/msgpack-3.1.1/include/msgpack/parse_return.hpp index 33ddcd7bcae..c06d1891ad6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/parse_return.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/parse_return.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/parse_return.hpp" #include "msgpack/v2/parse_return.hpp" +#include "msgpack/v3/parse_return.hpp" #endif // MSGPACK_PARSE_RETURN_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/predef.h b/lib/msgpack-3.1.1/include/msgpack/predef.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef.h rename to lib/msgpack-3.1.1/include/msgpack/predef.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture.h similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture.h index 63879a032fa..2a615cf1563 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/architecture.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/architecture.h @@ -19,6 +19,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include +#include #include #include #include diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/alpha.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/alpha.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/alpha.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/alpha.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/arm.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/arm.h similarity index 82% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/arm.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/arm.h index c37f2d13064..4421824b3a0 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/arm.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/arm.h @@ -27,11 +27,14 @@ Distributed under the Boost Software License, Version 1.0. [[`__TARGET_ARCH_ARM`] [__predef_detection__]] [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] [[`_M_ARM`] [__predef_detection__]] + [[`_M_ARM64`] [__predef_detection__]] [[`__arm64`] [8.0.0]] [[`__TARGET_ARCH_ARM`] [V.0.0]] [[`__TARGET_ARCH_THUMB`] [V.0.0]] + [[`__ARM_ARCH`] [V.0.0]] [[`_M_ARM`] [V.0.0]] + [[`_M_ARM64`] [8.0.0]] ] */ @@ -39,7 +42,8 @@ Distributed under the Boost Software License, Version 1.0. #if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \ - defined(_M_ARM) + defined(__ARM_ARCH) || \ + defined(_M_ARM) || defined(_M_ARM64) # undef MSGPACK_ARCH_ARM # if !defined(MSGPACK_ARCH_ARM) && defined(__arm64) # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0) @@ -50,6 +54,12 @@ Distributed under the Boost Software License, Version 1.0. # if !defined(MSGPACK_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0) # endif +# if !defined(MSGPACK_ARCH_ARM) && defined(__ARM_ARCH) +# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__ARM_ARCH,0,0) +# endif +# if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM64) +# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0) +# endif # if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM) # define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(_M_ARM,0,0) # endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/blackfin.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/blackfin.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/blackfin.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/blackfin.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/convex.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/convex.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/convex.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/convex.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/ia64.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/ia64.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/ia64.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/ia64.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/m68k.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/m68k.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/m68k.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/m68k.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/mips.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/mips.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/mips.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/mips.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/parisc.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/parisc.h similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/parisc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/parisc.h index bbd8aa16242..cb6a3087bf6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/parisc.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/parisc.h @@ -12,7 +12,7 @@ Distributed under the Boost Software License, Version 1.0. #include /*` -[heading `MSGPACK_ARCH_PARISK`] +[heading `MSGPACK_ARCH_PARISC`] [@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture. diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/ppc.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/ppc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/ppc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/ppc.h diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/architecture/ptx.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/ptx.h new file mode 100644 index 00000000000..686c5eeddbe --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/ptx.h @@ -0,0 +1,44 @@ +/* +Copyright Benjamin Worpitz 2018 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_ARCHITECTURE_PTX_H +#define MSGPACK_PREDEF_ARCHITECTURE_PTX_H + +#include +#include + +/*` +[heading `MSGPACK_ARCH_PTX`] + +[@https://en.wikipedia.org/wiki/Parallel_Thread_Execution PTX] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CUDA_ARCH__`] [__predef_detection__]] + + [[`__CUDA_ARCH__`] [V.R.0]] + ] + */ + +#define MSGPACK_ARCH_PTX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CUDA_ARCH__) +# undef MSGPACK_ARCH_PTX +# define MSGPACK_ARCH_PTX MSGPACK_PREDEF_MAKE_10_VR0(__CUDA_ARCH__) +#endif + +#if MSGPACK_ARCH_PTX +# define MSGPACK_ARCH_PTX_AVAILABLE +#endif + +#define MSGPACK_ARCH_PTX_NAME "PTX" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_PTX,MSGPACK_ARCH_PTX_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/pyramid.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/pyramid.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/pyramid.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/pyramid.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/rs6k.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/rs6k.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/rs6k.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/rs6k.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/sparc.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/sparc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/sparc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/sparc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/superh.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/superh.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/superh.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/superh.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/sys370.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/sys370.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/sys370.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/sys370.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/sys390.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/sys390.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/sys390.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/sys390.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86/32.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86/32.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86/32.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86/32.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86/64.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86/64.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/x86/64.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/x86/64.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/architecture/z.h b/lib/msgpack-3.1.1/include/msgpack/predef/architecture/z.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/architecture/z.h rename to lib/msgpack-3.1.1/include/msgpack/predef/architecture/z.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler.h similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler.h index 56058166744..c4ebb2dbc3d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/compiler.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/compiler.h @@ -32,6 +32,7 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include +#include #include #include #include diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/borland.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/borland.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/borland.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/borland.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/clang.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/clang.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/clang.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/clang.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/comeau.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/comeau.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/comeau.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/comeau.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/compaq.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/compaq.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/compaq.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/compaq.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/diab.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/diab.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/diab.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/diab.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/digitalmars.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/digitalmars.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/digitalmars.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/digitalmars.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/dignus.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/dignus.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/dignus.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/dignus.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/edg.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/edg.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/edg.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/edg.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/ekopath.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/ekopath.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/ekopath.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/ekopath.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/gcc.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/gcc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/gcc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/gcc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/gcc_xml.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/gcc_xml.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/gcc_xml.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/gcc_xml.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/greenhills.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/greenhills.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/greenhills.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/greenhills.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/hp_acc.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/hp_acc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/hp_acc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/hp_acc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/iar.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/iar.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/iar.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/iar.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/ibm.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/ibm.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/ibm.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/ibm.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/intel.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/intel.h similarity index 67% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/intel.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/intel.h index 7a1d76efeeb..c908b9db3c0 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/intel.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/intel.h @@ -1,5 +1,5 @@ /* -Copyright Rene Rivera 2008-2015 +Copyright Rene Rivera 2008-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -25,7 +25,8 @@ Version number available as major, minor, and patch. [[`__ICC`] [__predef_detection__]] [[`__ECC`] [__predef_detection__]] - [[`__INTEL_COMPILER`] [V.R.P]] + [[`__INTEL_COMPILER`] [V.R]] + [[`__INTEL_COMPILER` and `__INTEL_COMPILER_UPDATE`] [V.R.P]] ] */ @@ -33,8 +34,21 @@ Version number available as major, minor, and patch. #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ defined(__ECC) +/*` +[note Because of an Intel mistake in the release version numbering when +`__INTEL_COMPILER` is `9999` it is detected as version 12.1.0.] + */ +# if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999) +# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER(12,1,0) +# endif +# if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) +# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER( \ + MSGPACK_VERSION_NUMBER_MAJOR(MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \ + MSGPACK_VERSION_NUMBER_MINOR(MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \ + __INTEL_COMPILER_UPDATE) +# endif # if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) -# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) +# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER) # endif # if !defined(MSGPACK_COMP_INTEL_DETECTION) # define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/kai.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/kai.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/kai.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/kai.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/llvm.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/llvm.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/llvm.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/llvm.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/metaware.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/metaware.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/metaware.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/metaware.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/metrowerks.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/metrowerks.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/metrowerks.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/metrowerks.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/microtec.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/microtec.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/microtec.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/microtec.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/mpw.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/mpw.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/mpw.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/mpw.h diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/compiler/nvcc.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/nvcc.h new file mode 100644 index 00000000000..902e6372c38 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/nvcc.h @@ -0,0 +1,60 @@ +/* +Copyright Benjamin Worpitz 2018 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_COMPILER_NVCC_H +#define MSGPACK_PREDEF_COMPILER_NVCC_H + +#include +#include + +/*` +[heading `MSGPACK_COMP_NVCC`] + +[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler. +Version number available as major, minor, and patch beginning with version 7.5. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__NVCC__`] [__predef_detection__]] + + [[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]] + ] + */ + +#define MSGPACK_COMP_NVCC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__NVCC__) +# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__) +# define MSGPACK_COMP_NVCC_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE +# else +# define MSGPACK_COMP_NVCC_DETECTION MSGPACK_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__) +# endif +#endif + +#ifdef MSGPACK_COMP_NVCC_DETECTION +# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED) +# define MSGPACK_COMP_NVCC_EMULATED MSGPACK_COMP_NVCC_DETECTION +# else +# undef MSGPACK_COMP_NVCC +# define MSGPACK_COMP_NVCC MSGPACK_COMP_NVCC_DETECTION +# endif +# define MSGPACK_COMP_NVCC_AVAILABLE +# include +#endif + +#define MSGPACK_COMP_NVCC_NAME "NVCC" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_NVCC,MSGPACK_COMP_NVCC_NAME) + +#ifdef MSGPACK_COMP_NVCC_EMULATED +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_NVCC_EMULATED,MSGPACK_COMP_NVCC_NAME) +#endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/palm.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/palm.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/palm.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/palm.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/pgi.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/pgi.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/pgi.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/pgi.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/sgi_mipspro.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/sgi_mipspro.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/sgi_mipspro.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/sgi_mipspro.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/sunpro.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/sunpro.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/sunpro.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/sunpro.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/tendra.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/tendra.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/tendra.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/tendra.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/visualc.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/visualc.h similarity index 80% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/visualc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/visualc.h index 547a5bf1974..9cc3255a936 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/visualc.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/visualc.h @@ -29,6 +29,10 @@ Version number available as major, minor, and patch. [[`_MSC_FULL_VER`] [V.R.P]] [[`_MSC_VER`] [V.R.0]] ] + +[note Release of Visual Studio after 2015 will no longer be identified +by Boost Predef as the marketing version number. Instead we use the +compiler version number directly, i.e. the _MSC_VER number.] */ #define MSGPACK_COMP_MSVC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE @@ -53,8 +57,18 @@ Version number available as major, minor, and patch. means that the compiler and VS product versions are no longer in sync. Hence we need to use different formulas for mapping from MSC version to VS product version. + + VS2017 is a total nightmare when it comes to version numbers. + Hence to avoid arguments relating to that both present and + future.. Any version after VS2015 will use solely the compiler + version, i.e. cl.exe, as the version number here. */ -# if (_MSC_VER >= 1900) +# if (_MSC_VER > 1900) +# define MSGPACK_COMP_MSVC_DETECTION MSGPACK_VERSION_NUMBER(\ + _MSC_VER/100,\ + _MSC_VER%100,\ + MSGPACK_COMP_MSVC_BUILD) +# elif (_MSC_VER >= 1900) # define MSGPACK_COMP_MSVC_DETECTION MSGPACK_VERSION_NUMBER(\ _MSC_VER/100-5,\ _MSC_VER%100,\ diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/compiler/watcom.h b/lib/msgpack-3.1.1/include/msgpack/predef/compiler/watcom.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/compiler/watcom.h rename to lib/msgpack-3.1.1/include/msgpack/predef/compiler/watcom.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/_cassert.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/_cassert.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/_cassert.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/_cassert.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/_exception.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/_exception.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/_exception.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/_exception.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/comp_detected.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/comp_detected.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/comp_detected.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/comp_detected.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/endian_compat.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/endian_compat.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/endian_compat.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/endian_compat.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/os_detected.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/os_detected.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/os_detected.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/os_detected.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/platform_detected.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/platform_detected.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/platform_detected.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/platform_detected.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/test.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/test.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/test.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/test.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/detail/test_def.h b/lib/msgpack-3.1.1/include/msgpack/predef/detail/test_def.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/detail/test_def.h rename to lib/msgpack-3.1.1/include/msgpack/predef/detail/test_def.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/arm.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/arm.h similarity index 90% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/arm.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/arm.h index 0c22dbdc1f2..50a38299a90 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/arm.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/arm.h @@ -24,6 +24,7 @@ Distributed under the Boost Software License, Version 1.0. [[`__ARM_NEON__`] [__predef_detection__]] [[`__aarch64__`] [__predef_detection__]] [[`_M_ARM`] [__predef_detection__]] + [[`_M_ARM64`] [__predef_detection__]] ] [table @@ -32,6 +33,7 @@ Distributed under the Boost Software License, Version 1.0. [[`__ARM_NEON__`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]] [[`__aarch64__`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]] [[`_M_ARM`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]] + [[`_M_ARM64`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]] ] */ @@ -39,7 +41,7 @@ Distributed under the Boost Software License, Version 1.0. #define MSGPACK_HW_SIMD_ARM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE #undef MSGPACK_HW_SIMD_ARM -#if !defined(MSGPACK_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM)) +#if !defined(MSGPACK_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64)) # define MSGPACK_HW_SIMD_ARM MSGPACK_HW_SIMD_ARM_NEON_VERSION #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/arm/versions.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/arm/versions.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/arm/versions.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/arm/versions.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/ppc.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/ppc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/ppc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/ppc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/ppc/versions.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/ppc/versions.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/ppc/versions.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/ppc/versions.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86/versions.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86/versions.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86/versions.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86/versions.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86_amd.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86_amd.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86_amd.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86_amd.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86_amd/versions.h b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86_amd/versions.h similarity index 88% rename from lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86_amd/versions.h rename to lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86_amd/versions.h index 0bd4529985f..4d33db56b1f 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/hardware/simd/x86_amd/versions.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/hardware/simd/x86_amd/versions.h @@ -21,7 +21,7 @@ Distributed under the Boost Software License, Version 1.0. // --------------------------------- /*` - [heading `MSGPACK_HW_SIMD_X86_SSE4A_VERSION`] + [heading `MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION`] [@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific). @@ -30,7 +30,7 @@ Distributed under the Boost Software License, Version 1.0. #define MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION MSGPACK_VERSION_NUMBER(4, 0, 0) /*` - [heading `MSGPACK_HW_SIMD_X86_FMA4_VERSION`] + [heading `MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION`] [@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific). @@ -39,7 +39,7 @@ Distributed under the Boost Software License, Version 1.0. #define MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION MSGPACK_VERSION_NUMBER(5, 1, 0) /*` - [heading `MSGPACK_HW_SIMD_X86_XOP_VERSION`] + [heading `MSGPACK_HW_SIMD_X86_AMD_XOP_VERSION`] [@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific). diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/language.h b/lib/msgpack-3.1.1/include/msgpack/predef/language.h similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/predef/language.h rename to lib/msgpack-3.1.1/include/msgpack/predef/language.h index 7652c32cb68..83ea35316a6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/language.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/language.h @@ -13,5 +13,6 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include +#include #endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/language/cuda.h b/lib/msgpack-3.1.1/include/msgpack/predef/language/cuda.h new file mode 100644 index 00000000000..c7f4ccdae58 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/language/cuda.h @@ -0,0 +1,52 @@ +/* +Copyright Benjamin Worpitz 2018 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_LANGUAGE_CUDA_H +#define MSGPACK_PREDEF_LANGUAGE_CUDA_H + +#include +#include + +/*` +[heading `MSGPACK_LANG_CUDA`] + +[@https://en.wikipedia.org/wiki/CUDA CUDA C/C++] language. +If available, the version is detected as VV.RR.P. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CUDACC__`] [__predef_detection__]] + [[`__CUDA__`] [__predef_detection__]] + + [[`CUDA_VERSION`] [VV.RR.P]] + ] + */ + +#define MSGPACK_LANG_CUDA MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CUDACC__) || defined(__CUDA__) +# undef MSGPACK_LANG_CUDA +# include +# if defined(CUDA_VERSION) +# define MSGPACK_LANG_CUDA MSGPACK_PREDEF_MAKE_10_VVRRP(CUDA_VERSION) +# else +# define MSGPACK_LANG_CUDA MSGPACK_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if MSGPACK_LANG_CUDA +# define MSGPACK_LANG_CUDA_AVAILABLE +#endif + +#define MSGPACK_LANG_CUDA_NAME "CUDA C/C++" + + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_CUDA,MSGPACK_LANG_CUDA_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/language/objc.h b/lib/msgpack-3.1.1/include/msgpack/predef/language/objc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/language/objc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/language/objc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/language/stdc.h b/lib/msgpack-3.1.1/include/msgpack/predef/language/stdc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/language/stdc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/language/stdc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/language/stdcpp.h b/lib/msgpack-3.1.1/include/msgpack/predef/language/stdcpp.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/language/stdcpp.h rename to lib/msgpack-3.1.1/include/msgpack/predef/language/stdcpp.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library.h b/lib/msgpack-3.1.1/include/msgpack/predef/library.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c.h similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c.h index 2817bf91f18..33e710e1f76 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/library/c.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/library/c.h @@ -12,6 +12,7 @@ Distributed under the Boost Software License, Version 1.0. #include +#include #include #include #include diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c/_prefix.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/_prefix.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c/_prefix.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c/_prefix.h diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/library/c/cloudabi.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/cloudabi.h new file mode 100644 index 00000000000..2488cf40c8d --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/cloudabi.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2017 James E. King III + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef MSGPACK_PREDEF_LIBRARY_C_CLOUDABI_H +#define MSGPACK_PREDEF_LIBRARY_C_CLOUDABI_H + +#include +#include + +#include + +#if defined(__CloudABI__) +#include +#endif + +/*` +[heading `MSGPACK_LIB_C_CLOUDABI`] + +[@https://github.com/NuxiNL/cloudlibc cloudlibc] - CloudABI's standard C library. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cloudlibc__`] [__predef_detection__]] + + [[`__cloudlibc_major__`, `__cloudlibc_minor__`] [V.R.0]] + ] + */ + +#define MSGPACK_LIB_C_CLOUDABI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cloudlibc__) +# undef MSGPACK_LIB_C_CLOUDABI +# define MSGPACK_LIB_C_CLOUDABI \ + MSGPACK_VERSION_NUMBER(__cloudlibc_major__,__cloudlibc_minor__,0) +#endif + +#if MSGPACK_LIB_C_CLOUDABI +# define MSGPACK_LIB_C_CLOUDABI_AVAILABLE +#endif + +#define MSGPACK_LIB_C_CLOUDABI_NAME "cloudlibc" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LIB_C_CLOUDABI,MSGPACK_LIB_C_CLOUDABI_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c/gnu.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/gnu.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c/gnu.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c/gnu.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c/uc.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/uc.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c/uc.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c/uc.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c/vms.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/vms.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c/vms.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c/vms.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/c/zos.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/c/zos.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/c/zos.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/c/zos.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/_prefix.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/_prefix.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/_prefix.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/_prefix.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/cxx.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/cxx.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/cxx.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/cxx.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/dinkumware.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/dinkumware.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/dinkumware.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/dinkumware.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/libcomo.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/libcomo.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/libcomo.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/libcomo.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/modena.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/modena.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/modena.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/modena.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/msl.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/msl.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/msl.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/msl.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/roguewave.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/roguewave.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/roguewave.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/roguewave.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/sgi.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/sgi.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/sgi.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/sgi.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/stdcpp3.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/stdcpp3.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/stdcpp3.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/stdcpp3.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/stlport.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/stlport.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/stlport.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/stlport.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/library/std/vacpp.h b/lib/msgpack-3.1.1/include/msgpack/predef/library/std/vacpp.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/library/std/vacpp.h rename to lib/msgpack-3.1.1/include/msgpack/predef/library/std/vacpp.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/make.h b/lib/msgpack-3.1.1/include/msgpack/predef/make.h similarity index 89% rename from lib/msgpack-2.1.3/include/msgpack/predef/make.h rename to lib/msgpack-3.1.1/include/msgpack/predef/make.h index a0d8b128c99..26356f8ed27 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/make.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/make.h @@ -46,10 +46,14 @@ Macros are: #define MSGPACK_PREDEF_MAKE_0X_VVRRPP(V) MSGPACK_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF)) /*` `MSGPACK_PREDEF_MAKE_10_VPPP(V)` */ #define MSGPACK_PREDEF_MAKE_10_VPPP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) +/*` `MSGPACK_PREDEF_MAKE_10_VR0(V)` */ +#define MSGPACK_PREDEF_MAKE_10_VR0(V) MSGPACK_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,0) /*` `MSGPACK_PREDEF_MAKE_10_VRP(V)` */ #define MSGPACK_PREDEF_MAKE_10_VRP(V) MSGPACK_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) /*` `MSGPACK_PREDEF_MAKE_10_VRP000(V)` */ #define MSGPACK_PREDEF_MAKE_10_VRP000(V) MSGPACK_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) +/*` `MSGPACK_PREDEF_MAKE_10_VRPPPP(V)` */ +#define MSGPACK_PREDEF_MAKE_10_VRPPPP(V) MSGPACK_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,(V)%10000) /*` `MSGPACK_PREDEF_MAKE_10_VRPP(V)` */ #define MSGPACK_PREDEF_MAKE_10_VRPP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) /*` `MSGPACK_PREDEF_MAKE_10_VRR(V)` */ @@ -62,8 +66,12 @@ Macros are: #define MSGPACK_PREDEF_MAKE_10_VV00(V) MSGPACK_VERSION_NUMBER(((V)/100)%100,0,0) /*` `MSGPACK_PREDEF_MAKE_10_VVRR(V)` */ #define MSGPACK_PREDEF_MAKE_10_VVRR(V) MSGPACK_VERSION_NUMBER(((V)/100)%100,(V)%100,0) +/*` `MSGPACK_PREDEF_MAKE_10_VVRRP(V)` */ +#define MSGPACK_PREDEF_MAKE_10_VVRRP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%100,((V)/10)%100,(V)%10) /*` `MSGPACK_PREDEF_MAKE_10_VVRRPP(V)` */ #define MSGPACK_PREDEF_MAKE_10_VVRRPP(V) MSGPACK_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) +/*` `MSGPACK_PREDEF_MAKE_10_VVRRPPP(V)` */ +#define MSGPACK_PREDEF_MAKE_10_VVRRPPP(V) MSGPACK_VERSION_NUMBER(((V)/100000)%100,((V)/1000)%100,(V)%1000) /*` `MSGPACK_PREDEF_MAKE_10_VVRR0PP00(V)` */ #define MSGPACK_PREDEF_MAKE_10_VVRR0PP00(V) MSGPACK_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) /*` `MSGPACK_PREDEF_MAKE_10_VVRR0PPPP(V)` */ diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os.h b/lib/msgpack-3.1.1/include/msgpack/predef/os.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/aix.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/aix.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/aix.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/aix.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/amigaos.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/amigaos.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/amigaos.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/amigaos.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/android.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/android.h similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/android.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/android.h index 14195ea8ef2..40f58038271 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/os/android.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/os/android.h @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. http://www.boost.org/LICENSE_1_0.txt) */ -#ifndef MSGPACK_PREDEF_OS_ADROID_H -#define MSGPACK_PREDEF_OS_ADROID_H +#ifndef MSGPACK_PREDEF_OS_ANDROID_H +#define MSGPACK_PREDEF_OS_ANDROID_H #include #include diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/beos.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/beos.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/beos.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/beos.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/bsdi.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/bsdi.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/bsdi.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/bsdi.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/dragonfly.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/dragonfly.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/dragonfly.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/dragonfly.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/free.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/free.h similarity index 75% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/free.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/free.h index 29cc2db4399..64862bdb445 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/free.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/free.h @@ -34,13 +34,20 @@ Distributed under the Boost Software License, Version 1.0. # define MSGPACK_OS_BSD_AVAILABLE # endif # undef MSGPACK_OS_BSD_FREE +# include # if defined(__FreeBSD_version) -# if __FreeBSD_version < 500000 +# if __FreeBSD_version == 491000 # define MSGPACK_OS_BSD_FREE \ - MSGPACK_PREDEF_MAKE_10_VRP000(__FreeBSD_version) + MSGPACK_VERSION_NUMBER(4, 10, 0) +# elif __FreeBSD_version == 492000 +# define MSGPACK_OS_BSD_FREE \ + MSGPACK_VERSION_NUMBER(4, 11, 0) +# elif __FreeBSD_version < 500000 +# define MSGPACK_OS_BSD_FREE \ + MSGPACK_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version) # else # define MSGPACK_OS_BSD_FREE \ - MSGPACK_PREDEF_MAKE_10_VRR000(__FreeBSD_version) + MSGPACK_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version) # endif # else # define MSGPACK_OS_BSD_FREE MSGPACK_VERSION_NUMBER_AVAILABLE diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/net.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/net.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/net.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/net.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/open.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/open.h similarity index 65% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/open.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/open.h index 3c14b01421d..2492847ee72 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/os/bsd/open.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/os/bsd/open.h @@ -50,6 +50,26 @@ Distributed under the Boost Software License, Version 1.0. [[`OpenBSD4_7`] [4.7.0]] [[`OpenBSD4_8`] [4.8.0]] [[`OpenBSD4_9`] [4.9.0]] + [[`OpenBSD5_0`] [5.0.0]] + [[`OpenBSD5_1`] [5.1.0]] + [[`OpenBSD5_2`] [5.2.0]] + [[`OpenBSD5_3`] [5.3.0]] + [[`OpenBSD5_4`] [5.4.0]] + [[`OpenBSD5_5`] [5.5.0]] + [[`OpenBSD5_6`] [5.6.0]] + [[`OpenBSD5_7`] [5.7.0]] + [[`OpenBSD5_8`] [5.8.0]] + [[`OpenBSD5_9`] [5.9.0]] + [[`OpenBSD6_0`] [6.0.0]] + [[`OpenBSD6_1`] [6.1.0]] + [[`OpenBSD6_2`] [6.2.0]] + [[`OpenBSD6_3`] [6.3.0]] + [[`OpenBSD6_4`] [6.4.0]] + [[`OpenBSD6_5`] [6.5.0]] + [[`OpenBSD6_6`] [6.6.0]] + [[`OpenBSD6_7`] [6.7.0]] + [[`OpenBSD6_8`] [6.8.0]] + [[`OpenBSD6_9`] [6.9.0]] ] */ @@ -153,6 +173,66 @@ Distributed under the Boost Software License, Version 1.0. # if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD4_9) # define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(4,9,0) # endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_0) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,0,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_1) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,1,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_2) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,2,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_3) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,3,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_4) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,4,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_5) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,5,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_6) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,6,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_7) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,7,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_8) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,8,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_9) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,9,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_0) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,0,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_1) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,1,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_2) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,2,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_3) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,3,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_4) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,4,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_5) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,5,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_6) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,6,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_7) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,7,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_8) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,8,0) +# endif +# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_9) +# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,9,0) +# endif # if !defined(MSGPACK_OS_BSD_OPEN) # define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER_AVAILABLE # endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/cygwin.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/cygwin.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/cygwin.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/cygwin.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/haiku.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/haiku.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/haiku.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/haiku.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/hpux.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/hpux.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/hpux.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/hpux.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/ios.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/ios.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/ios.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/ios.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/irix.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/irix.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/irix.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/irix.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/linux.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/linux.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/linux.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/linux.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/macos.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/macos.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/macos.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/macos.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/os400.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/os400.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/os400.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/os400.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/qnxnto.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/qnxnto.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/qnxnto.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/qnxnto.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/solaris.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/solaris.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/solaris.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/solaris.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/unix.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/unix.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/unix.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/unix.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/vms.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/vms.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/vms.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/vms.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/os/windows.h b/lib/msgpack-3.1.1/include/msgpack/predef/os/windows.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/os/windows.h rename to lib/msgpack-3.1.1/include/msgpack/predef/os/windows.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/other.h b/lib/msgpack-3.1.1/include/msgpack/predef/other.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/predef/other.h rename to lib/msgpack-3.1.1/include/msgpack/predef/other.h diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/other/endian.h b/lib/msgpack-3.1.1/include/msgpack/predef/other/endian.h similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/predef/other/endian.h rename to lib/msgpack-3.1.1/include/msgpack/predef/other/endian.h index 3c609fa4112..afbda29329b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/other/endian.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/other/endian.h @@ -148,8 +148,7 @@ information and acquired knowledge: # undef MSGPACK_ENDIAN_BIG_BYTE # define MSGPACK_ENDIAN_BIG_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE # endif -# if MSGPACK_ARCH_AMD64 || \ - MSGPACK_ARCH_IA64 || \ +# if MSGPACK_ARCH_IA64 || \ MSGPACK_ARCH_X86 || \ MSGPACK_ARCH_BLACKFIN # undef MSGPACK_ENDIAN_LITTLE_BYTE diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/other/workaround.h b/lib/msgpack-3.1.1/include/msgpack/predef/other/workaround.h new file mode 100644 index 00000000000..998c4687d5f --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/other/workaround.h @@ -0,0 +1,87 @@ +/* +Copyright Rene Rivera 2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_WORKAROUND_H +#define MSGPACK_PREDEF_WORKAROUND_H + +/*` +[heading `MSGPACK_PREDEF_WORKAROUND`] + +`` +MSGPACK_PREDEF_WORKAROUND(symbol,comp,major,minor,patch) +`` + +Usage: + +`` +#if MSGPACK_PREDEF_WORKAROUND(MSGPACK_COMP_CLANG,<,3,0,0) + // Workaround for old clang compilers.. +#endif +`` + +Defines a comparison against two version numbers that depends on the definion +of `MSGPACK_STRICT_CONFIG`. When `MSGPACK_STRICT_CONFIG` is defined this will expand +to a value convertible to `false`. Which has the effect of disabling all code +conditionally guarded by `MSGPACK_PREDEF_WORKAROUND`. When `MSGPACK_STRICT_CONFIG` +is undefine this expand to test the given `symbol` version value with the +`comp` comparison against `MSGPACK_VERSION_NUMBER(major,minor,patch)`. +*/ +#ifdef MSGPACK_STRICT_CONFIG +# define MSGPACK_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) (0) +#else +# include +# define MSGPACK_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) \ + ( (symbol) != (0) ) && \ + ( (symbol) comp (MSGPACK_VERSION_NUMBER( (major) , (minor) , (patch) )) ) +#endif + +/*` +[heading `MSGPACK_PREDEF_TESTED_AT`] + +`` +MSGPACK_PREDEF_TESTED_AT(symbol,major,minor,patch) +`` + +Usage: + +`` +#if MSGPACK_PREDEF_TESTED_AT(MSGPACK_COMP_CLANG,3,5,0) + // Needed for clang, and last checked for 3.5.0. +#endif +`` + +Defines a comparison against two version numbers that depends on the definion +of `MSGPACK_STRICT_CONFIG` and `MSGPACK_DETECT_OUTDATED_WORKAROUNDS`. +When `MSGPACK_STRICT_CONFIG` is defined this will expand to a value convertible +to `false`. Which has the effect of disabling all code +conditionally guarded by `MSGPACK_PREDEF_TESTED_AT`. When `MSGPACK_STRICT_CONFIG` +is undefined this expand to either: + +* A value convertible to `true` when `MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is not + defined. +* A value convertible `true` when the expansion of + `MSGPACK_PREDEF_WORKAROUND(symbol, <=, major, minor, patch)` is `true` and + `MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is defined. +* A compile error when the expansion of + `MSGPACK_PREDEF_WORKAROUND(symbol, >, major, minor, patch)` is true and + `MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is defined. +*/ +#ifdef MSGPACK_STRICT_CONFIG +# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) (0) +#else +# ifdef MSGPACK_DETECT_OUTDATED_WORKAROUNDS +# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) ( \ + MSGPACK_PREDEF_WORKAROUND(symbol, <=, major, minor, patch) \ + ? 1 \ + : (1%0) ) +# else +# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) \ + ( (symbol) >= MSGPACK_VERSION_NUMBER_AVAILABLE ) +# endif +#endif + +#endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform.h similarity index 61% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform.h index 34255c2bc66..0176b465027 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform.h @@ -11,11 +11,18 @@ Distributed under the Boost Software License, Version 1.0. #define MSGPACK_PREDEF_PLATFORM_H #endif +#include #include +#include +#include +#include #include -#include #include -#include +#include +#include +#include +#include // deprecated +#include /*#include */ #endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/cloudabi.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/cloudabi.h new file mode 100644 index 00000000000..66ece6e008b --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/cloudabi.h @@ -0,0 +1,43 @@ +/* + Copyright 2017 James E. King, III + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_CLOUDABI_H +#define MSGPACK_PREDEF_PLAT_CLOUDABI_H + +#include +#include + +/*` +[heading `MSGPACK_PLAT_CLOUDABI`] + +[@https://github.com/NuxiNL/cloudabi CloudABI] platform. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CloudABI__`] [__predef_detection__]] + ] + */ + +#define MSGPACK_PLAT_CLOUDABI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CloudABI__) +# undef MSGPACK_PLAT_CLOUDABI +# define MSGPACK_PLAT_CLOUDABI MSGPACK_VERSION_NUMBER_AVAILABLE +#endif + +#if MSGPACK_PLAT_CLOUDABI +# define MSGPACK_PLAT_CLOUDABI_AVAILABLE +# include +#endif + +#define MSGPACK_PLAT_CLOUDABI_NAME "CloudABI" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_CLOUDABI,MSGPACK_PLAT_CLOUDABI_NAME) diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/ios.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/ios.h new file mode 100644 index 00000000000..c3d27f83216 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/ios.h @@ -0,0 +1,58 @@ +/* +Copyright Ruslan Baratov 2017 +Copyright Rene Rivera 2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_IOS_H +#define MSGPACK_PREDEF_PLAT_IOS_H + +#include // MSGPACK_OS_IOS +#include // MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +/*` +[heading `MSGPACK_PLAT_IOS_DEVICE`] +[heading `MSGPACK_PLAT_IOS_SIMULATOR`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]] + ] + */ + +#define MSGPACK_PLAT_IOS_DEVICE MSGPACK_VERSION_NUMBER_NOT_AVAILABLE +#define MSGPACK_PLAT_IOS_SIMULATOR MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h +#if MSGPACK_OS_IOS +# include +# if TARGET_IPHONE_SIMULATOR == 1 +# undef MSGPACK_PLAT_IOS_SIMULATOR +# define MSGPACK_PLAT_IOS_SIMULATOR MSGPACK_VERSION_NUMBER_AVAILABLE +# else +# undef MSGPACK_PLAT_IOS_DEVICE +# define MSGPACK_PLAT_IOS_DEVICE MSGPACK_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if MSGPACK_PLAT_IOS_SIMULATOR +# define MSGPACK_PLAT_IOS_SIMULATOR_AVAILABLE +# include +#endif + +#if MSGPACK_PLAT_IOS_DEVICE +# define MSGPACK_PLAT_IOS_DEVICE_AVAILABLE +# include +#endif + +#define MSGPACK_PLAT_IOS_SIMULATOR_NAME "iOS Simulator" +#define MSGPACK_PLAT_IOS_DEVICE_NAME "iOS Device" + +#endif // MSGPACK_PREDEF_PLAT_IOS_H + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_IOS_SIMULATOR,MSGPACK_PLAT_IOS_SIMULATOR_NAME) +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_IOS_DEVICE,MSGPACK_PLAT_IOS_DEVICE_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform/mingw.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw.h similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform/mingw.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw.h index 213f932cac0..74f1b548106 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform/mingw.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw.h @@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0. http://www.boost.org/LICENSE_1_0.txt) */ -#ifndef MSGPACK_PREDEF_COMPILER_MINGW_H -#define MSGPACK_PREDEF_COMPILER_MINGW_H +#ifndef MSGPACK_PREDEF_PLAT_MINGW_H +#define MSGPACK_PREDEF_PLAT_MINGW_H #include #include @@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0. /*` [heading `MSGPACK_PLAT_MINGW`] -[@http://en.wikipedia.org/wiki/MinGW MinGW] platform. +[@http://en.wikipedia.org/wiki/MinGW MinGW] platform, either variety. Version number available as major, minor, and patch. [table @@ -56,7 +56,7 @@ Version number available as major, minor, and patch. # include #endif -#define MSGPACK_PLAT_MINGW_NAME "MinGW" +#define MSGPACK_PLAT_MINGW_NAME "MinGW (any variety)" #endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw32.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw32.h new file mode 100644 index 00000000000..5d28f828919 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw32.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_MINGW32_H +#define MSGPACK_PREDEF_PLAT_MINGW32_H + +#include +#include + +/*` +[heading `MSGPACK_PLAT_MINGW32`] + +[@http://www.mingw.org/ MinGW] platform. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW32__`] [__predef_detection__]] + + [[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]] + ] + */ + +#define MSGPACK_PLAT_MINGW32 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MINGW32__) +# include <_mingw.h> +# if !defined(MSGPACK_PLAT_MINGW32_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define MSGPACK_PLAT_MINGW32_DETECTION \ + MSGPACK_VERSION_NUMBER(__MINGW32_VERSION_MAJOR,__MINGW32_VERSION_MINOR,0) +# endif +# if !defined(MSGPACK_PLAT_MINGW32_DETECTION) +# define MSGPACK_PLAT_MINGW32_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef MSGPACK_PLAT_MINGW32_DETECTION +# define MSGPACK_PLAT_MINGW32_AVAILABLE +# if defined(MSGPACK_PREDEF_DETAIL_PLAT_DETECTED) +# define MSGPACK_PLAT_MINGW32_EMULATED MSGPACK_PLAT_MINGW32_DETECTION +# else +# undef MSGPACK_PLAT_MINGW32 +# define MSGPACK_PLAT_MINGW32 MSGPACK_PLAT_MINGW32_DETECTION +# endif +# include +#endif + +#define MSGPACK_PLAT_MINGW32_NAME "MinGW" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW32,MSGPACK_PLAT_MINGW32_NAME) + +#ifdef MSGPACK_PLAT_MINGW32_EMULATED +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW32_EMULATED,MSGPACK_PLAT_MINGW32_NAME) +#endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw64.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw64.h new file mode 100644 index 00000000000..544b27b39a0 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/mingw64.h @@ -0,0 +1,63 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_MINGW64_H +#define MSGPACK_PREDEF_PLAT_MINGW64_H + +#include +#include + +/*` +[heading `MSGPACK_PLAT_MINGW64`] + +[@https://mingw-w64.org/ MinGW-w64] platform. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW64__`] [__predef_detection__]] + + [[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]] + ] + */ + +#define MSGPACK_PLAT_MINGW64 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MINGW64__) +# include <_mingw.h> +# if !defined(MSGPACK_PLAT_MINGW64_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define MSGPACK_PLAT_MINGW64_DETECTION \ + MSGPACK_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) +# endif +# if !defined(MSGPACK_PLAT_MINGW64_DETECTION) +# define MSGPACK_PLAT_MINGW64_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef MSGPACK_PLAT_MINGW64_DETECTION +# define MSGPACK_PLAT_MINGW64_AVAILABLE +# if defined(MSGPACK_PREDEF_DETAIL_PLAT_DETECTED) +# define MSGPACK_PLAT_MINGW64_EMULATED MSGPACK_PLAT_MINGW64_DETECTION +# else +# undef MSGPACK_PLAT_MINGW64 +# define MSGPACK_PLAT_MINGW64 MSGPACK_PLAT_MINGW64_DETECTION +# endif +# include +#endif + +#define MSGPACK_PLAT_MINGW64_NAME "MinGW-w64" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW64,MSGPACK_PLAT_MINGW64_NAME) + +#ifdef MSGPACK_PLAT_MINGW64_EMULATED +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW64_EMULATED,MSGPACK_PLAT_MINGW64_NAME) +#endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_desktop.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_desktop.h similarity index 73% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_desktop.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_desktop.h index 9f0c4f1fc23..8e69c77cd9f 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_desktop.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_desktop.h @@ -9,25 +9,31 @@ Distributed under the Boost Software License, Version 1.0. #ifndef MSGPACK_PREDEF_PLAT_WINDOWS_DESKTOP_H #define MSGPACK_PREDEF_PLAT_WINDOWS_DESKTOP_H -#include #include #include +#include +#include /*` [heading `MSGPACK_PLAT_WINDOWS_DESKTOP`] +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows Desktop development. Also available if the Platform SDK is too +old to support UWP. + [table [[__predef_symbol__] [__predef_version__]] - [[`!WINAPI_FAMILY`] [__predef_detection__]] [[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]] + [[`!MSGPACK_PLAT_WINDOWS_UWP`] [__predef_detection__]] ] */ #define MSGPACK_PLAT_WINDOWS_DESKTOP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE #if MSGPACK_OS_WINDOWS && \ - ( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) ) + ((defined(WINAPI_FAMILY_DESKTOP_APP) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) || \ + !MSGPACK_PLAT_WINDOWS_UWP) # undef MSGPACK_PLAT_WINDOWS_DESKTOP # define MSGPACK_PLAT_WINDOWS_DESKTOP MSGPACK_VERSION_NUMBER_AVAILABLE #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_phone.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_phone.h similarity index 79% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_phone.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_phone.h index a224f69c9b8..8ac423fc34b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_phone.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_phone.h @@ -9,13 +9,17 @@ Distributed under the Boost Software License, Version 1.0. #ifndef MSGPACK_PREDEF_PLAT_WINDOWS_PHONE_H #define MSGPACK_PREDEF_PLAT_WINDOWS_PHONE_H -#include #include #include +#include +#include /*` [heading `MSGPACK_PLAT_WINDOWS_PHONE`] +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows Phone development. + [table [[__predef_symbol__] [__predef_version__]] @@ -25,7 +29,8 @@ Distributed under the Boost Software License, Version 1.0. #define MSGPACK_PLAT_WINDOWS_PHONE MSGPACK_VERSION_NUMBER_NOT_AVAILABLE -#if MSGPACK_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +#if MSGPACK_OS_WINDOWS && \ + defined(WINAPI_FAMILY_PHONE_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP # undef MSGPACK_PLAT_WINDOWS_PHONE # define MSGPACK_PLAT_WINDOWS_PHONE MSGPACK_VERSION_NUMBER_AVAILABLE #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_runtime.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_runtime.h similarity index 63% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_runtime.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_runtime.h index 759b2f8658c..db7e76b4f70 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_runtime.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_runtime.h @@ -9,25 +9,33 @@ Distributed under the Boost Software License, Version 1.0. #ifndef MSGPACK_PREDEF_PLAT_WINDOWS_RUNTIME_H #define MSGPACK_PREDEF_PLAT_WINDOWS_RUNTIME_H -#include #include #include +#include +#include +#include /*` [heading `MSGPACK_PLAT_WINDOWS_RUNTIME`] +Deprecated. + +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows Phone or Store development. This does not align to the existing development model for +UWP and is deprecated. Use one of the other `MSGPACK_PLAT_WINDOWS_*`definitions instead. + [table [[__predef_symbol__] [__predef_version__]] - [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] - [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + [[`MSGPACK_PLAT_WINDOWS_PHONE`] [__predef_detection__]] + [[`MSGPACK_PLAT_WINDOWS_STORE`] [__predef_detection__]] ] */ #define MSGPACK_PLAT_WINDOWS_RUNTIME MSGPACK_VERSION_NUMBER_NOT_AVAILABLE -#if MSGPACK_OS_WINDOWS && defined(WINAPI_FAMILY) && \ - ( WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP ) +#if MSGPACK_OS_WINDOWS && \ + (MSGPACK_PLAT_WINDOWS_STORE || MSGPACK_PLAT_WINDOWS_PHONE) # undef MSGPACK_PLAT_WINDOWS_RUNTIME # define MSGPACK_PLAT_WINDOWS_RUNTIME MSGPACK_VERSION_NUMBER_AVAILABLE #endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_server.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_server.h new file mode 100644 index 00000000000..3506155ec32 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_server.h @@ -0,0 +1,47 @@ +/* +Copyright James E. King III, 2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_WINDOWS_SERVER_H +#define MSGPACK_PREDEF_PLAT_WINDOWS_SERVER_H + +#include +#include +#include +#include + +/*` +[heading `MSGPACK_PLAT_WINDOWS_SERVER`] + +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows Server development. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_SERVER`] [__predef_detection__]] + ] + */ + +#define MSGPACK_PLAT_WINDOWS_SERVER MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if MSGPACK_OS_WINDOWS && \ + defined(WINAPI_FAMILY_SERVER) && WINAPI_FAMILY == WINAPI_FAMILY_SERVER +# undef MSGPACK_PLAT_WINDOWS_SERVER +# define MSGPACK_PLAT_WINDOWS_SERVER MSGPACK_VERSION_NUMBER_AVAILABLE +#endif + +#if MSGPACK_PLAT_WINDOWS_SERVER +# define MSGPACK_PLAT_WINDOWS_SERVER_AVAILABLE +# include +#endif + +#define MSGPACK_PLAT_WINDOWS_SERVER_NAME "Windows Server" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_WINDOWS_SERVER,MSGPACK_PLAT_WINDOWS_SERVER_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_store.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_store.h similarity index 66% rename from lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_store.h rename to lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_store.h index c538c9b3e8f..d9faf1a59fa 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/platform/windows_store.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_store.h @@ -9,23 +9,30 @@ Distributed under the Boost Software License, Version 1.0. #ifndef MSGPACK_PREDEF_PLAT_WINDOWS_STORE_H #define MSGPACK_PREDEF_PLAT_WINDOWS_STORE_H -#include #include #include +#include +#include /*` [heading `MSGPACK_PLAT_WINDOWS_STORE`] +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows Store development. + [table [[__predef_symbol__] [__predef_version__]] - [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] - ] + [[`WINAPI_FAMILY == WINAPI_FAMILY_PC_APP`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP` (deprecated)] [__predef_detection__]] +] */ #define MSGPACK_PLAT_WINDOWS_STORE MSGPACK_VERSION_NUMBER_NOT_AVAILABLE -#if MSGPACK_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP +#if MSGPACK_OS_WINDOWS && \ + ((defined(WINAPI_FAMILY_PC_APP) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) || \ + (defined(WINAPI_FAMILY_APP) && WINAPI_FAMILY == WINAPI_FAMILY_APP)) # undef MSGPACK_PLAT_WINDOWS_STORE # define MSGPACK_PLAT_WINDOWS_STORE MSGPACK_VERSION_NUMBER_AVAILABLE #endif diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_system.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_system.h new file mode 100644 index 00000000000..c97b0e26883 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_system.h @@ -0,0 +1,47 @@ +/* +Copyright James E. King III, 2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_WINDOWS_SYSTEM_H +#define MSGPACK_PREDEF_PLAT_WINDOWS_SYSTEM_H + +#include +#include +#include +#include + +/*` +[heading `MSGPACK_PLAT_WINDOWS_SYSTEM`] + +[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP] +for Windows System development. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM`] [__predef_detection__]] + ] + */ + +#define MSGPACK_PLAT_WINDOWS_SYSTEM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if MSGPACK_OS_WINDOWS && \ + defined(WINAPI_FAMILY_SYSTEM) && WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM +# undef MSGPACK_PLAT_WINDOWS_SYSTEM +# define MSGPACK_PLAT_WINDOWS_SYSTEM MSGPACK_VERSION_NUMBER_AVAILABLE +#endif + +#if MSGPACK_PLAT_WINDOWS_SYSTEM +# define MSGPACK_PLAT_WINDOWS_SYSTEM_AVAILABLE +# include +#endif + +#define MSGPACK_PLAT_WINDOWS_SYSTEM_NAME "Windows Drivers and Tools" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_WINDOWS_SYSTEM,MSGPACK_PLAT_WINDOWS_SYSTEM_NAME) diff --git a/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_uwp.h b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_uwp.h new file mode 100644 index 00000000000..abf1916afdd --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/predef/platform/windows_uwp.h @@ -0,0 +1,60 @@ +/* +Copyright James E. King III, 2017 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef MSGPACK_PREDEF_PLAT_WINDOWS_UWP_H +#define MSGPACK_PREDEF_PLAT_WINDOWS_UWP_H + +#include +#include +#include + +/*` +[heading `MSGPACK_PLAT_WINDOWS_UWP`] + +[@http://docs.microsoft.com/windows/uwp/ Universal Windows Platform] +is available if the current development environment is capable of targeting +UWP development. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW64_VERSION_MAJOR` from `_mingw.h`] [`>= 3`]] + [[`VER_PRODUCTBUILD` from `ntverp.h`] [`>= 9200`]] +] +*/ + +#define MSGPACK_PLAT_WINDOWS_UWP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE +#define MSGPACK_PLAT_WINDOWS_SDK_VERSION MSGPACK_VERSION_NUMBER_NOT_AVAILABLE + +#if MSGPACK_OS_WINDOWS +// MinGW (32-bit) has no ntverp.h header +#if !defined(__MINGW32__) +# include +# undef MSGPACK_PLAT_WINDOWS_SDK_VERSION +# define MSGPACK_PLAT_WINDOWS_SDK_VERSION MSGPACK_VERSION_NUMBER(0, 0, VER_PRODUCTBUILD) +#endif + +// 9200 is Windows SDK 8.0 from ntverp.h which introduced family support +#if ((MSGPACK_PLAT_WINDOWS_SDK_VERSION >= MSGPACK_VERSION_NUMBER(0, 0, 9200)) || \ + (defined(__MINGW64__) && __MINGW64_VERSION_MAJOR >= 3)) +# undef MSGPACK_PLAT_WINDOWS_UWP +# define MSGPACK_PLAT_WINDOWS_UWP MSGPACK_VERSION_NUMBER_AVAILABLE +#endif +#endif + +#if MSGPACK_PLAT_WINDOWS_UWP +# define MSGPACK_PLAT_WINDOWS_UWP_AVAILABLE +# include +# include // Windows SDK +#endif + +#define MSGPACK_PLAT_WINDOWS_UWP_NAME "Universal Windows Platform" + +#endif + +#include +MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_WINDOWS_UWP, MSGPACK_PLAT_WINDOWS_UWP_NAME) diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/version.h b/lib/msgpack-3.1.1/include/msgpack/predef/version.h similarity index 83% rename from lib/msgpack-2.1.3/include/msgpack/predef/version.h rename to lib/msgpack-3.1.1/include/msgpack/predef/version.h index 12a3382244b..adacf28f14c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/version.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/version.h @@ -10,6 +10,6 @@ Distributed under the Boost Software License, Version 1.0. #include -#define MSGPACK_PREDEF_VERSION MSGPACK_VERSION_NUMBER(1,4,1) +#define MSGPACK_PREDEF_VERSION MSGPACK_VERSION_NUMBER(1,8,0) #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/predef/version_number.h b/lib/msgpack-3.1.1/include/msgpack/predef/version_number.h similarity index 73% rename from lib/msgpack-2.1.3/include/msgpack/predef/version_number.h rename to lib/msgpack-3.1.1/include/msgpack/predef/version_number.h index be8ff5527bd..593afab0d7c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/predef/version_number.h +++ b/lib/msgpack-3.1.1/include/msgpack/predef/version_number.h @@ -1,5 +1,5 @@ /* -Copyright Rene Rivera 2005, 2008-2013 +Copyright Rene Rivera 2005-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -50,4 +50,23 @@ Defines standard version numbers, with these properties: #define MSGPACK_VERSION_NUMBER_NOT_AVAILABLE \ MSGPACK_VERSION_NUMBER_ZERO +/*` +`` +MSGPACK_VERSION_NUMBER_MAJOR(N), MSGPACK_VERSION_NUMBER_MINOR(N), MSGPACK_VERSION_NUMBER_PATCH(N) +`` + +The macros extract the major, minor, and patch portion from a well formed +version number resulting in a preprocessor expression in the range of +\[0,99\] or \[0,99999\] for the major and minor, or patch numbers +respectively. +*/ +#define MSGPACK_VERSION_NUMBER_MAJOR(N) \ + ( ((N)/10000000)%100 ) + +#define MSGPACK_VERSION_NUMBER_MINOR(N) \ + ( ((N)/100000)%100 ) + +#define MSGPACK_VERSION_NUMBER_PATCH(N) \ + ( (N)%100000 ) + #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/add.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/add.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/add.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/add.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/dec.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/dec.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/dec.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/dec.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/detail/div_base.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/detail/div_base.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/detail/div_base.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/detail/div_base.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/div.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/div.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/div.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/div.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/inc.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/inc.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/inc.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/inc.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/mod.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/mod.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/mod.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/mod.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/mul.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/mul.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/mul.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/mul.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/sub.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/sub.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/arithmetic/sub.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/arithmetic/sub.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/data.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/data.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/data.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/data.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/detail/get_data.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/detail/get_data.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/detail/get_data.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/detail/get_data.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/elem.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/elem.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/elem.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/elem.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/insert.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/insert.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/insert.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/insert.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/pop_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/pop_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/pop_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/pop_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/pop_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/pop_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/pop_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/pop_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/push_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/push_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/push_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/push_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/push_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/push_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/push_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/push_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/remove.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/remove.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/remove.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/remove.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/replace.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/replace.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/replace.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/replace.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/reverse.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/reverse.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/reverse.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/reverse.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/size.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/size.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_list.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/array/to_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/array/to_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/assert_msg.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/assert_msg.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/assert_msg.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/assert_msg.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/cat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/cat.hpp similarity index 88% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/cat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/cat.hpp index a7b2926237d..775a7cd4103 100644 --- a/lib/msgpack-2.1.3/include/msgpack/preprocessor/cat.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/preprocessor/cat.hpp @@ -25,7 +25,7 @@ # define MSGPACK_PP_CAT_OO(par) MSGPACK_PP_CAT_I ## par # endif # -# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() +# if (~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC()) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) # define MSGPACK_PP_CAT_I(a, b) a ## b # else # define MSGPACK_PP_CAT_I(a, b) MSGPACK_PP_CAT_II(~, a ## b) diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comma.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comma.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comma.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comma.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comma_if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comma_if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comma_if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comma_if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/equal.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/equal.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/equal.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/equal.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/greater.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/greater.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/greater.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/greater.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/greater_equal.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/greater_equal.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/greater_equal.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/greater_equal.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/less.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/less.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/less.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/less.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/less_equal.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/less_equal.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/less_equal.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/less_equal.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/not_equal.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/not_equal.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/comparison/not_equal.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/comparison/not_equal.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/config/config.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/config/config.hpp similarity index 73% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/config/config.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/config/config.hpp index 7ae4b15b4f9..51c43cbed4b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/preprocessor/config/config.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/preprocessor/config/config.hpp @@ -25,18 +25,16 @@ # define MSGPACK_PP_CONFIG_DMC() 0x0040 # # ifndef MSGPACK_PP_CONFIG_FLAGS -# if defined(__GCCXML__) -# define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) -# elif defined(__WAVE__) -# define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) -# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 +# if defined(__GCCXML__) || defined(__WAVE__) || defined(__MWERKS__) && __MWERKS__ >= 0x3200 # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) # elif defined(__EDG__) || defined(__EDG_VERSION__) -# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) +# if defined(_MSC_VER) && !defined(__clang__) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_MSVC()) # else # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_EDG() | MSGPACK_PP_CONFIG_STRICT()) # endif +# elif defined(_MSC_VER) && defined(__clang__) +# define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) # elif defined(__MWERKS__) # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_MWCC()) # elif defined(__DMC__) @@ -45,7 +43,7 @@ # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) # elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_BCC()) -# elif defined(_MSC_VER) && !defined(__clang__) +# elif defined(_MSC_VER) # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_MSVC()) # else # define MSGPACK_PP_CONFIG_FLAGS() (MSGPACK_PP_CONFIG_STRICT()) @@ -73,10 +71,14 @@ # define MSGPACK_PP_VARIADICS_MSVC 0 # if !defined MSGPACK_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# if defined __GCCXML__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __PGI # define MSGPACK_PP_VARIADICS 0 -# /* VC++ (C/C++) */ -# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ +# elif defined(__CUDACC__) +# define MSGPACK_PP_VARIADICS 1 +# elif defined(_MSC_VER) && defined(__clang__) +# define MSGPACK_PP_VARIADICS 1 +# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */ +# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__) || defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) # define MSGPACK_PP_VARIADICS 1 # undef MSGPACK_PP_VARIADICS_MSVC # define MSGPACK_PP_VARIADICS_MSVC 1 @@ -92,7 +94,7 @@ # elif !MSGPACK_PP_VARIADICS + 1 < 2 # undef MSGPACK_PP_VARIADICS # define MSGPACK_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) +# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) # undef MSGPACK_PP_VARIADICS_MSVC # define MSGPACK_PP_VARIADICS_MSVC 1 # endif diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/config/limits.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/config/limits.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/config/limits.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/config/limits.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/deduce_d.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/deduce_d.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/deduce_d.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/deduce_d.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/dmc/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/dmc/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/dmc/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/dmc/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/edg/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/edg/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/edg/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/edg/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/msvc/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/msvc/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/msvc/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/msvc/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/detail/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/detail/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/expr_if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/expr_if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/expr_if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/expr_if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/expr_iif.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/expr_iif.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/expr_iif.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/expr_iif.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/iif.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/iif.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/iif.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/iif.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/control/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/control/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/control/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/control/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/debug.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/debug.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/debug.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/debug.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/assert.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/assert.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/assert.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/assert.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/error.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/error.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/error.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/error.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/line.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/line.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/debug/line.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/debug/line.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/dec.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/dec.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/dec.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/dec.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/auto_rec.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/auto_rec.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/auto_rec.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/auto_rec.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/check.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/check.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/check.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/check.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/dmc/auto_rec.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/dmc/auto_rec.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/dmc/auto_rec.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/dmc/auto_rec.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_binary.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_binary.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_binary.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_binary.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_nullary.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_nullary.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_nullary.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_nullary.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_unary.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_unary.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/is_unary.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/is_unary.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/null.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/null.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/null.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/null.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/split.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/split.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/detail/split.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/detail/split.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/empty.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/empty.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/empty.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/empty.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params_with_a_default.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params_with_a_default.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params_with_a_default.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params_with_a_default.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params_with_defaults.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params_with_defaults.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_params_with_defaults.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_params_with_defaults.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_shifted.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_shifted.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_shifted.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_shifted.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_shifted_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_shifted_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/enum_shifted_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/enum_shifted_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/expand.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/expand.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/expand.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/expand.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/expr_if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/expr_if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/expr_if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/expr_if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/apply.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/apply.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/apply.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/apply.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/detail/is_empty.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/detail/is_empty.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/detail/is_empty.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/detail/is_empty.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/empty.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/empty.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/empty.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/empty.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/expand.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/expand.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/expand.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/expand.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/identity.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/identity.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/identity.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/identity.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/intercept.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/intercept.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/intercept.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/intercept.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty_or_1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty_or_1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty_or_1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty_or_1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty_variadic.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty_variadic.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/is_empty_variadic.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/is_empty_variadic.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/overload.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/overload.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/facilities/overload.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/facilities/overload.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/identity.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/identity.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/identity.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/identity.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/inc.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/inc.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/inc.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/inc.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iterate.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iterate.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iterate.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iterate.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower2.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower2.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower2.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower2.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower3.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower3.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower3.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower3.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower4.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower4.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower4.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower4.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower5.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower5.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/lower5.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/lower5.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper2.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper2.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper2.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper2.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper3.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper3.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper3.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper3.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper4.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper4.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper4.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper4.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper5.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper5.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/bounds/upper5.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/bounds/upper5.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/finish.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/finish.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/finish.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/finish.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward2.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward2.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward2.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward2.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward3.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward3.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward3.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward3.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward4.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward4.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward4.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward4.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward5.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward5.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/forward5.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/forward5.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse2.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse2.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse2.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse2.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse3.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse3.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse3.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse3.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse4.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse4.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse4.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse4.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse5.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse5.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/iter/reverse5.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/iter/reverse5.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/local.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/local.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/local.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/local.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/rlocal.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/rlocal.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/rlocal.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/rlocal.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/self.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/self.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/self.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/self.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/start.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/start.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/detail/start.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/detail/start.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/iterate.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/iterate.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/iterate.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/iterate.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/local.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/local.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/local.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/local.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/self.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/self.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/iteration/self.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/iteration/self.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/library.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/library.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/library.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/library.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/limits.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/limits.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/limits.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/limits.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/adt.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/adt.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/adt.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/adt.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/append.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/append.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/append.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/append.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/at.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/at.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/at.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/at.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/cat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/cat.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/cat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/cat.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/dmc/fold_left.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/dmc/fold_left.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/dmc/fold_left.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/dmc/fold_left.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/edg/fold_left.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/edg/fold_left.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/edg/fold_left.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/edg/fold_left.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/edg/fold_right.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/edg/fold_right.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/edg/fold_right.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/edg/fold_right.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/fold_left.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/fold_left.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/fold_left.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/fold_left.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/fold_right.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/fold_right.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/detail/fold_right.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/detail/fold_right.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/filter.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/filter.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/filter.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/filter.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/first_n.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/first_n.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/first_n.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/first_n.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/fold_left.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/fold_left.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/fold_left.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/fold_left.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/fold_right.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/fold_right.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/fold_right.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/fold_right.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each_i.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each_i.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each_i.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each_i.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each_product.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each_product.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/for_each_product.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/for_each_product.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/rest_n.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/rest_n.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/rest_n.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/rest_n.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/reverse.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/reverse.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/reverse.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/reverse.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/size.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/size.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_array.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/to_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/to_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/list/transform.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/list/transform.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/list/transform.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/list/transform.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/and.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/and.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/and.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/and.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitand.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitand.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitand.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitand.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitnor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitnor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitnor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitnor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitxor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitxor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bitxor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bitxor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bool.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bool.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/bool.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/bool.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/compl.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/compl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/compl.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/compl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/nor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/nor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/nor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/nor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/not.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/not.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/not.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/not.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/or.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/or.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/or.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/or.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/xor.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/xor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/logical/xor.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/logical/xor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/max.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/max.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/max.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/max.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/min.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/min.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/min.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/min.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/comma.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/comma.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/comma.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/comma.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/comma_if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/comma_if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/comma_if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/comma_if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/detail/is_begin_parens.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/detail/is_begin_parens.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/detail/is_begin_parens.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/detail/is_begin_parens.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/is_begin_parens.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/is_begin_parens.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/is_begin_parens.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/is_begin_parens.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/paren.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/paren.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/paren.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/paren.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/paren_if.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/paren_if.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/paren_if.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/paren_if.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/remove_parens.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/remove_parens.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/punctuation/remove_parens.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/punctuation/remove_parens.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_2nd.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_2nd.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_2nd.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_2nd.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_3rd.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_3rd.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_3rd.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_3rd.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to_2nd.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to_2nd.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to_2nd.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to_2nd.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to_3rd.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to_3rd.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repeat_from_to_3rd.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repeat_from_to_3rd.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/deduce_r.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/deduce_r.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/deduce_r.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/deduce_r.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/deduce_z.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/deduce_z.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/deduce_z.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/deduce_z.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/dmc/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/dmc/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/dmc/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/dmc/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/edg/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/edg/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/edg/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/edg/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/msvc/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/msvc/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/detail/msvc/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/detail/msvc/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_binary_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_binary_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_binary_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_binary_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params_with_a_default.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params_with_a_default.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params_with_a_default.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params_with_a_default.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params_with_defaults.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params_with_defaults.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_params_with_defaults.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_params_with_defaults.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted_binary_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted_binary_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted_binary_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted_binary_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_shifted_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_shifted_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing_binary_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing_binary_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing_binary_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing_binary_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing_params.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing_params.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/enum_trailing_params.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/enum_trailing_params.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/for.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/for.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/for.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/for.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/repeat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/repeat.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/repeat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/repeat.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/repeat_from_to.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/repeat_from_to.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/repetition/repeat_from_to.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/repetition/repeat_from_to.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/selection.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/selection.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/selection.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/selection.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/selection/max.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/selection/max.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/selection/max.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/selection/max.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/selection/min.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/selection/min.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/selection/min.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/selection/min.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/cat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/cat.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/cat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/cat.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/binary_transform.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/binary_transform.hpp similarity index 78% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/binary_transform.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/binary_transform.hpp index cc4e6fd7c9a..e197ff27e7b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/binary_transform.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/binary_transform.hpp @@ -30,14 +30,13 @@ # endif # if MSGPACK_PP_VARIADICS # if MSGPACK_PP_VARIADICS_MSVC -# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_GET_REM(...) \ - MSGPACK_PP_VARIADIC_IS_SINGLE_RETURN(MSGPACK_PP_REM_CAT,MSGPACK_PP_REM,__VA_ARGS__) \ - /**/ +# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_REM(data) data +# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_A(...) (MSGPACK_PP_SEQ_BINARY_TRANSFORM_REM, __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_B +# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_B(...) (MSGPACK_PP_SEQ_BINARY_TRANSFORM_REM, __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_A # else -# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_GET_REM(...) MSGPACK_PP_REM +# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_A(...) (MSGPACK_PP_REM, __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_B +# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_B(...) (MSGPACK_PP_REM, __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_A # endif -# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_A(...) (MSGPACK_PP_SEQ_BINARY_TRANSFORM_GET_REM(__VA_ARGS__), __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_B -# define MSGPACK_PP_SEQ_BINARY_TRANSFORM_B(...) (MSGPACK_PP_SEQ_BINARY_TRANSFORM_GET_REM(__VA_ARGS__), __VA_ARGS__)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_A # else # define MSGPACK_PP_SEQ_BINARY_TRANSFORM_A(e) (MSGPACK_PP_REM, e)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_B # define MSGPACK_PP_SEQ_BINARY_TRANSFORM_B(e) (MSGPACK_PP_REM, e)() MSGPACK_PP_SEQ_BINARY_TRANSFORM_A diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/is_empty.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/is_empty.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/is_empty.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/is_empty.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/split.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/split.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/detail/split.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/split.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/to_list_msvc.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/to_list_msvc.hpp new file mode 100644 index 00000000000..942db3ad044 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/detail/to_list_msvc.hpp @@ -0,0 +1,55 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2016. * +# * Distributed under the Boost Software License, Version 1.0. (See * +# * accompanying file LICENSE_1_0.txt or copy at * +# * http://www.boost.org/LICENSE_1_0.txt) * +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef MSGPACK_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP +# define MSGPACK_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP +# +# include +# +# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() +# +# include +# include +# include +# include +# +# define MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state) \ + MSGPACK_PP_TUPLE_ELEM(2, 0, state) \ +/**/ +# define MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \ + MSGPACK_PP_TUPLE_ELEM(2, 1, state) \ +/**/ +# define MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED(d,state) \ + MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \ +/**/ +# define MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_OP(d,state) \ + ( \ + MSGPACK_PP_CAT(MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state),), \ + MSGPACK_PP_DEC(MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state)) \ + ) \ +/**/ +# +# /* MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC */ +# +# define MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC(result,seqsize) \ + MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT \ + ( \ + MSGPACK_PP_WHILE \ + ( \ + MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED, \ + MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC_OP, \ + (result,seqsize) \ + ) \ + ) \ +/**/ +# endif // MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() +# +# endif // MSGPACK_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/elem.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/elem.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/elem.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/elem.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/filter.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/filter.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/filter.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/filter.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/first_n.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/first_n.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/first_n.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/first_n.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/fold_left.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/fold_left.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/fold_left.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/fold_left.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/fold_right.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/fold_right.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/fold_right.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/fold_right.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each_i.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each_i.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each_i.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each_i.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each_product.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each_product.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/for_each_product.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/for_each_product.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/insert.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/insert.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/insert.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/insert.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/pop_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/pop_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/pop_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/pop_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/pop_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/pop_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/pop_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/pop_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/push_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/push_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/push_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/push_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/push_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/push_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/push_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/push_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/remove.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/remove.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/remove.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/remove.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/replace.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/replace.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/replace.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/replace.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/rest_n.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/rest_n.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/rest_n.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/rest_n.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/reverse.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/reverse.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/reverse.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/reverse.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/size.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/size.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/subseq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/subseq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/subseq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/subseq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_array.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_list.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_list.hpp similarity index 80% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_list.hpp index e40866be2bd..21370781143 100644 --- a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_list.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_list.hpp @@ -19,7 +19,19 @@ # # /* MSGPACK_PP_SEQ_TO_LIST */ # +# if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() +# include +# include +# define MSGPACK_PP_SEQ_TO_LIST(seq) \ + MSGPACK_PP_SEQ_DETAIL_TO_LIST_MSVC \ + ( \ + MSGPACK_PP_SEQ_TO_LIST_I(MSGPACK_PP_SEQ_BINARY_TRANSFORM(seq)), \ + MSGPACK_PP_SEQ_SIZE(seq) \ + ) \ +/**/ +# else # define MSGPACK_PP_SEQ_TO_LIST(seq) MSGPACK_PP_SEQ_TO_LIST_I(MSGPACK_PP_SEQ_BINARY_TRANSFORM(seq)) +# endif # define MSGPACK_PP_SEQ_TO_LIST_I(bseq) MSGPACK_PP_SEQ_TO_LIST_A bseq MSGPACK_PP_NIL MSGPACK_PP_SEQ_TO_LIST_B bseq # define MSGPACK_PP_SEQ_TO_LIST_A(m, e) m(MSGPACK_PP_LPAREN() e MSGPACK_PP_COMMA() MSGPACK_PP_SEQ_TO_LIST_A_ID) # define MSGPACK_PP_SEQ_TO_LIST_A_ID() MSGPACK_PP_SEQ_TO_LIST_A diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/to_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/to_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/transform.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/transform.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/transform.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/transform.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/variadic_seq_to_seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/variadic_seq_to_seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/seq/variadic_seq_to_seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/seq/variadic_seq_to_seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/counter.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/counter.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/counter.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/counter.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/counter.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/counter.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/counter.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/counter.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/def.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/def.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/def.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/def.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/shared.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/shared.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/shared.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/shared.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot1.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot1.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot1.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot1.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot2.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot2.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot2.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot2.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot3.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot3.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot3.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot3.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot4.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot4.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot4.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot4.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot5.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot5.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/detail/slot5.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/detail/slot5.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/slot.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/slot.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/slot/slot.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/slot/slot.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/stringize.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/stringize.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/stringize.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/stringize.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/detail/is_single_return.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/detail/is_single_return.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/detail/is_single_return.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/detail/is_single_return.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/eat.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/eat.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/eat.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/eat.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/elem.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/elem.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/elem.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/elem.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/enum.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/enum.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/enum.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/enum.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/insert.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/insert.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/insert.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/insert.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/pop_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/pop_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/pop_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/pop_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/pop_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/pop_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/pop_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/pop_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/push_back.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/push_back.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/push_back.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/push_back.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/push_front.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/push_front.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/push_front.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/push_front.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/rem.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/rem.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/rem.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/rem.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/remove.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/remove.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/remove.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/remove.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/replace.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/replace.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/replace.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/replace.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/reverse.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/reverse.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/reverse.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/reverse.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/size.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/size.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_array.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_list.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/tuple/to_seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/tuple/to_seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/detail/is_single_return.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/detail/is_single_return.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/detail/is_single_return.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/detail/is_single_return.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/elem.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/elem.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/elem.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/elem.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/size.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/size.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_array.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_array.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_array.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_list.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_list.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_list.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_seq.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_seq.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_seq.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_seq.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/variadic/to_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/variadic/to_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/while.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/while.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/while.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/while.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/preprocessor/wstringize.hpp b/lib/msgpack-3.1.1/include/msgpack/preprocessor/wstringize.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/preprocessor/wstringize.hpp rename to lib/msgpack-3.1.1/include/msgpack/preprocessor/wstringize.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/sbuffer.h b/lib/msgpack-3.1.1/include/msgpack/sbuffer.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/sbuffer.h rename to lib/msgpack-3.1.1/include/msgpack/sbuffer.h diff --git a/lib/msgpack-2.1.3/include/msgpack/sbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/sbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/sbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/sbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/sbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/sbuffer_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/sbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/sbuffer_decl.hpp index 985ed404c8e..58efec460bd 100644 --- a/lib/msgpack-2.1.3/include/msgpack/sbuffer_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/sbuffer_decl.hpp @@ -12,6 +12,7 @@ #include "msgpack/v1/sbuffer_decl.hpp" #include "msgpack/v2/sbuffer_decl.hpp" +#include "msgpack/v3/sbuffer_decl.hpp" #endif // MSGPACK_SBUFFER_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/sysdep.h b/lib/msgpack-3.1.1/include/msgpack/sysdep.h similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/sysdep.h rename to lib/msgpack-3.1.1/include/msgpack/sysdep.h index 569ae4cdf7f..b430956b4f0 100644 --- a/lib/msgpack-2.1.3/include/msgpack/sysdep.h +++ b/lib/msgpack-3.1.1/include/msgpack/sysdep.h @@ -10,8 +10,6 @@ #ifndef MSGPACK_SYSDEP_H #define MSGPACK_SYSDEP_H -#include - #include #include @@ -86,6 +84,10 @@ #endif +#if !defined(MSGPACK_ENDIAN_LITTLE_BYTE) && !defined(MSGPACK_ENDIAN_BIG_BYTE) +#include +#endif // !defined(MSGPACK_ENDIAN_LITTLE_BYTE) && !defined(MSGPACK_ENDIAN_BIG_BYTE) + #if MSGPACK_ENDIAN_LITTLE_BYTE # if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__) diff --git a/lib/msgpack-3.1.1/include/msgpack/timestamp.h b/lib/msgpack-3.1.1/include/msgpack/timestamp.h new file mode 100644 index 00000000000..7613931257f --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/timestamp.h @@ -0,0 +1,58 @@ +/* + * MessagePack for C TimeStamp + * + * Copyright (C) 2018 KONDO Takatoshi + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef MSGPACK_TIMESTAMP_H +#define MSGPACK_TIMESTAMP_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct msgpack_timestamp { + int64_t tv_sec; + uint32_t tv_nsec; +} msgpack_timestamp; + +static inline bool msgpack_object_to_timestamp(const msgpack_object* obj, msgpack_timestamp* ts) { + if (obj->type != MSGPACK_OBJECT_EXT) return false; + if (obj->via.ext.type != -1) return false; + switch (obj->via.ext.size) { + case 4: + ts->tv_nsec = 0; + { + uint32_t v; + _msgpack_load32(uint32_t, obj->via.ext.ptr, &v); + ts->tv_sec = v; + } + return true; + case 8: { + uint64_t value; + _msgpack_load64(uint64_t, obj->via.ext.ptr, &value); + ts->tv_nsec = (uint32_t)(value >> 34); + ts->tv_sec = value & 0x00000003ffffffffLL; + return true; + } + case 12: + _msgpack_load32(uint32_t, obj->via.ext.ptr, &ts->tv_nsec); + _msgpack_load64(int64_t, obj->via.ext.ptr + 4, &ts->tv_sec); + return true; + default: + return false; + } +} + + +#ifdef __cplusplus +} +#endif + +#endif /* msgpack/timestamp.h */ diff --git a/lib/msgpack-2.1.3/include/msgpack/type.hpp b/lib/msgpack-3.1.1/include/msgpack/type.hpp similarity index 84% rename from lib/msgpack-2.1.3/include/msgpack/type.hpp rename to lib/msgpack-3.1.1/include/msgpack/type.hpp index 2ef6aa9e4c1..1a866c5684e 100644 --- a/lib/msgpack-2.1.3/include/msgpack/type.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/type.hpp @@ -34,6 +34,7 @@ #include "adaptor/cpp11/array.hpp" #include "adaptor/cpp11/array_char.hpp" #include "adaptor/cpp11/array_unsigned_char.hpp" +#include "adaptor/cpp11/chrono.hpp" #include "adaptor/cpp11/forward_list.hpp" #include "adaptor/cpp11/reference_wrapper.hpp" #include "adaptor/cpp11/shared_ptr.hpp" @@ -42,12 +43,17 @@ #include "adaptor/cpp11/unordered_map.hpp" #include "adaptor/cpp11/unordered_set.hpp" -#if __cplusplus >= 201703 - +#if MSGPACK_HAS_INCLUDE() #include "adaptor/cpp17/optional.hpp" +#endif // MSGPACK_HAS_INCLUDE() + +#if MSGPACK_HAS_INCLUDE() #include "adaptor/cpp17/string_view.hpp" +#endif // MSGPACK_HAS_INCLUDE() -#endif // __cplusplus >= 201703 +#include "adaptor/cpp17/byte.hpp" +#include "adaptor/cpp17/carray_byte.hpp" +#include "adaptor/cpp17/vector_byte.hpp" #endif // defined(MSGPACK_USE_CPP03) diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack.h b/lib/msgpack-3.1.1/include/msgpack/unpack.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/unpack.h rename to lib/msgpack-3.1.1/include/msgpack/unpack.h diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/unpack.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/unpack.hpp rename to lib/msgpack-3.1.1/include/msgpack/unpack.hpp index 7ea44086934..d1e42929688 100644 --- a/lib/msgpack-2.1.3/include/msgpack/unpack.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/unpack.hpp @@ -14,6 +14,6 @@ #include "msgpack/v1/unpack.hpp" #include "msgpack/v2/unpack.hpp" -#include "msgpack/v2/x3_unpack.hpp" +#include "msgpack/v3/unpack.hpp" #endif // MSGPACK_UNPACK_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/unpack_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/unpack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/unpack_decl.hpp index d3b117465fd..69a751d0306 100644 --- a/lib/msgpack-2.1.3/include/msgpack/unpack_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/unpack_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/unpack_decl.hpp" #include "msgpack/v2/unpack_decl.hpp" +#include "msgpack/v3/unpack_decl.hpp" #endif // MSGPACK_UNPACK_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack_define.h b/lib/msgpack-3.1.1/include/msgpack/unpack_define.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/unpack_define.h rename to lib/msgpack-3.1.1/include/msgpack/unpack_define.h diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack_exception.hpp b/lib/msgpack-3.1.1/include/msgpack/unpack_exception.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/unpack_exception.hpp rename to lib/msgpack-3.1.1/include/msgpack/unpack_exception.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/unpack_template.h b/lib/msgpack-3.1.1/include/msgpack/unpack_template.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/unpack_template.h rename to lib/msgpack-3.1.1/include/msgpack/unpack_template.h diff --git a/lib/msgpack-2.1.3/include/msgpack/util.h b/lib/msgpack-3.1.1/include/msgpack/util.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/util.h rename to lib/msgpack-3.1.1/include/msgpack/util.h diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/adaptor_base.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/adaptor_base.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/adaptor_base.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/adaptor_base.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/adaptor_base_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/adaptor_base_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/adaptor_base_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/adaptor_base_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/array_ref.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/array_ref.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/array_ref.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/array_ref.hpp index b5d7304f12a..f81df47c048 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/array_ref.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/array_ref.hpp @@ -253,7 +253,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; @@ -280,7 +280,7 @@ struct object_with_zone > { if (!v.data) { throw msgpack::type_error(); } o.type = msgpack::type::ARRAY; uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/array_ref_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/array_ref_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/array_ref_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/array_ref_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/bool.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/bool.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/bool.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/bool.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/fusion.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/fusion.hpp similarity index 78% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/fusion.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/fusion.hpp index 29c288ba557..69a1124067a 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/fusion.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/fusion.hpp @@ -15,6 +15,8 @@ #include "msgpack/adaptor/check_container_size.hpp" #include "msgpack/meta.hpp" +#include "msgpack/adaptor/pair.hpp" + #if !defined (MSGPACK_USE_CPP03) #include "msgpack/adaptor/cpp11/tuple.hpp" #endif // #if !defined (MSGPACK_USE_CPP03) @@ -34,13 +36,54 @@ MSGPACK_API_VERSION_NAMESPACE(v1) { namespace adaptor { +namespace detail { + +template +struct is_std_pair { + static bool const value = false; +}; + +template +struct is_std_pair > { + static bool const value = true; +}; + +#if !defined(MSGPACK_USE_CPP03) + +template +struct is_std_tuple { + static bool const value = false; +}; + +template +struct is_std_tuple> { + static bool const value = true; +}; + +#endif // !defined(MSGPACK_USE_CPP03) + +template +struct is_seq_no_pair_no_tuple { + static bool const value = + boost::fusion::traits::is_sequence::value + && + !is_std_pair::value +#if !defined (MSGPACK_USE_CPP03) + && + !is_std_tuple::value +#endif // !defined (MSGPACK_USE_CPP03) + ; +}; + +} // namespace detail + #if !defined (MSGPACK_USE_CPP03) template struct as< T, typename msgpack::enable_if< - boost::fusion::traits::is_sequence::value && + detail::is_seq_no_pair_no_tuple::value && boost::mpl::fold< T, boost::mpl::bool_, @@ -82,7 +125,7 @@ struct as< #endif // !defined (MSGPACK_USE_CPP03) template -struct convert::value>::type > { +struct convert::value>::type > { msgpack::object const& operator()(msgpack::object const& o, T& v) const { if (o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); } if (o.via.array.size != checked_get_container_size(boost::fusion::size(v))) { @@ -106,7 +149,7 @@ struct convert -struct pack::value>::type > { +struct pack::value>::type > { template msgpack::packer& operator()(msgpack::packer& o, const T& v) const { uint32_t size = checked_get_container_size(boost::fusion::size(v)); @@ -128,11 +171,11 @@ struct pack }; template -struct object_with_zone::value>::type > { +struct object_with_zone::value>::type > { void operator()(msgpack::object::with_zone& o, const T& v) const { uint32_t size = checked_get_container_size(boost::fusion::size(v)); o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = size; uint32_t count = 0; boost::fusion::for_each(v, with_zone_imp(o, count)); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/optional.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/optional.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/optional.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/optional.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/string_ref.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/string_ref.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/string_ref.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/string_ref.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/string_view.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/string_view.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/boost/string_view.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/boost/string_view.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/carray.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/carray.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/carray.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/carray.hpp index c023233b8c6..8fff446887b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/carray.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/carray.hpp @@ -151,7 +151,7 @@ struct object_with_zone { void operator()(msgpack::object::with_zone& o, const T(&v)[N]) const { uint32_t size = checked_get_container_size(N); o.type = msgpack::type::ARRAY; - msgpack::object* ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object) * size)); + msgpack::object* ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object) * size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.ptr = ptr; o.via.array.size = size; const T* pv = v; @@ -169,7 +169,7 @@ struct object_with_zone { char const* p2 = static_cast(std::memchr(p, '\0', size)); uint32_t adjusted_size = p2 ? static_cast(p2 - p) : size; o.type = msgpack::type::STR; - char* ptr = static_cast(o.zone.allocate_align(adjusted_size)); + char* ptr = static_cast(o.zone.allocate_align(adjusted_size, MSGPACK_ZONE_ALIGNOF(char))); o.via.str.ptr = ptr; o.via.str.size = adjusted_size; std::memcpy(ptr, p, adjusted_size); @@ -184,7 +184,7 @@ struct object_with_zone { char const* p2 = static_cast(std::memchr(p, '\0', size)); uint32_t adjusted_size = p2 ? static_cast(p2 - p) : size; o.type = msgpack::type::STR; - char* ptr = static_cast(o.zone.allocate_align(adjusted_size)); + char* ptr = static_cast(o.zone.allocate_align(adjusted_size, MSGPACK_ZONE_ALIGNOF(char))); o.via.str.ptr = ptr; o.via.str.size = adjusted_size; std::memcpy(ptr, p, adjusted_size); @@ -196,7 +196,7 @@ struct object_with_zone { void operator()(msgpack::object::with_zone& o, const unsigned char(&v)[N]) const { uint32_t size = checked_get_container_size(N); o.type = msgpack::type::BIN; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; o.via.bin.size = size; std::memcpy(ptr, v, size); @@ -208,7 +208,7 @@ struct object_with_zone { void operator()(msgpack::object::with_zone& o, const unsigned char(&v)[N]) const { uint32_t size = checked_get_container_size(N); o.type = msgpack::type::BIN; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; o.via.bin.size = size; std::memcpy(ptr, v, size); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/char_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/char_ptr.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/char_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/char_ptr.hpp index 4e6919b8bb4..a405fa3c3b1 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/char_ptr.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/char_ptr.hpp @@ -41,7 +41,7 @@ struct object_with_zone { void operator()(msgpack::object::with_zone& o, const char* v) const { uint32_t size = checked_get_container_size(std::strlen(v)); o.type = msgpack::type::STR; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.str.ptr = ptr; o.via.str.size = size; std::memcpy(ptr, v, size); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/check_container_size.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/check_container_size.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/check_container_size.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/check_container_size.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/check_container_size_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/check_container_size_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/check_container_size_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/check_container_size_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array.hpp index 1c01e3e0916..1a5ba36bb0a 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array.hpp @@ -119,7 +119,7 @@ struct object_with_zone> { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = size; o.via.array.ptr = p; for (auto const& e : v) *p++ = msgpack::object(e, o.zone); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_char.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_char.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_char.hpp index a44c0aff431..865e77eb536 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_char.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_char.hpp @@ -79,7 +79,7 @@ struct object_with_zone> { void operator()(msgpack::object::with_zone& o, const std::array& v) const { uint32_t size = checked_get_container_size(v.size()); o.type = msgpack::type::BIN; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; o.via.bin.size = size; std::memcpy(ptr, v.data(), size); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp index 73fcc89260c..5b35d15f70d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp @@ -79,7 +79,7 @@ struct object_with_zone> { void operator()(msgpack::object::with_zone& o, const std::array& v) const { uint32_t size = checked_get_container_size(v.size()); o.type = msgpack::type::BIN; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; o.via.bin.size = size; std::memcpy(ptr, v.data(), size); diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/chrono.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/chrono.hpp new file mode 100644 index 00000000000..db2035b7380 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/chrono.hpp @@ -0,0 +1,215 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_V1_TYPE_CPP11_CHRONO_HPP +#define MSGPACK_V1_TYPE_CPP11_CHRONO_HPP + +#include "msgpack/versioning.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" +#include "msgpack/adaptor/check_container_size.hpp" + +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond + +namespace adaptor { + +template <> +struct as { + typename std::chrono::system_clock::time_point operator()(msgpack::object const& o) const { + if(o.type != msgpack::type::EXT) { throw msgpack::type_error(); } + if(o.via.ext.type() != -1) { throw msgpack::type_error(); } + std::chrono::system_clock::time_point tp; + switch(o.via.ext.size) { + case 4: { + uint32_t sec; + _msgpack_load32(uint32_t, o.via.ext.data(), &sec); + tp += std::chrono::seconds(sec); + } break; + case 8: { + uint64_t value; + _msgpack_load64(uint64_t, o.via.ext.data(), &value); + uint32_t nanosec = static_cast(value >> 34); + uint64_t sec = value & 0x00000003ffffffffLL; + tp += std::chrono::duration_cast( + std::chrono::nanoseconds(nanosec)); + tp += std::chrono::seconds(sec); + } break; + case 12: { + uint32_t nanosec; + _msgpack_load32(uint32_t, o.via.ext.data(), &nanosec); + int64_t sec; + _msgpack_load64(int64_t, o.via.ext.data() + 4, &sec); + tp += std::chrono::duration_cast( + std::chrono::nanoseconds(nanosec)); + tp += std::chrono::seconds(sec); + } break; + default: + throw msgpack::type_error(); + } + return tp; + } +}; + +template <> +struct convert { + msgpack::object const& operator()(msgpack::object const& o, std::chrono::system_clock::time_point& v) const { + if(o.type != msgpack::type::EXT) { throw msgpack::type_error(); } + if(o.via.ext.type() != -1) { throw msgpack::type_error(); } + std::chrono::system_clock::time_point tp; + switch(o.via.ext.size) { + case 4: { + uint32_t sec; + _msgpack_load32(uint32_t, o.via.ext.data(), &sec); + tp += std::chrono::seconds(sec); + v = tp; + } break; + case 8: { + uint64_t value; + _msgpack_load64(uint64_t, o.via.ext.data(), &value); + uint32_t nanosec = static_cast(value >> 34); + uint64_t sec = value & 0x00000003ffffffffLL; + tp += std::chrono::duration_cast( + std::chrono::nanoseconds(nanosec)); + tp += std::chrono::seconds(sec); + v = tp; + } break; + case 12: { + uint32_t nanosec; + _msgpack_load32(uint32_t, o.via.ext.data(), &nanosec); + int64_t sec; + _msgpack_load64(int64_t, o.via.ext.data() + 4, &sec); + tp += std::chrono::duration_cast( + std::chrono::nanoseconds(nanosec)); + tp += std::chrono::seconds(sec); + v = tp; + } break; + default: + throw msgpack::type_error(); + } + return o; + } +}; + +template <> +struct pack { + template + msgpack::packer& operator()(msgpack::packer& o, const std::chrono::system_clock::time_point& v) const { + int64_t count = static_cast(v.time_since_epoch().count()); + + int64_t nano_num = + std::chrono::system_clock::duration::period::ratio::num * + (1000000000 / std::chrono::system_clock::duration::period::ratio::den); + + int64_t nanosec = count % (1000000000 / nano_num) * nano_num; + int64_t sec = 0; + if (nanosec < 0) { + nanosec = 1000000000 + nanosec; + --sec; + } + sec += count + * std::chrono::system_clock::duration::period::ratio::num + / std::chrono::system_clock::duration::period::ratio::den; + if ((sec >> 34) == 0) { + uint64_t data64 = (nanosec << 34) | sec; + if ((data64 & 0xffffffff00000000L) == 0) { + // timestamp 32 + o.pack_ext(4, -1); + uint32_t data32 = static_cast(data64); + char buf[4]; + _msgpack_store32(buf, data32); + o.pack_ext_body(buf, 4); + } + else { + // timestamp 64 + o.pack_ext(8, -1); + char buf[8]; + _msgpack_store64(buf, data64); + o.pack_ext_body(buf, 8); + } + } + else { + // timestamp 96 + o.pack_ext(12, -1); + char buf[12]; + _msgpack_store32(&buf[0], static_cast(nanosec)); + _msgpack_store64(&buf[4], sec); + o.pack_ext_body(buf, 12); + } + return o; + } +}; + +template <> +struct object_with_zone { + void operator()(msgpack::object::with_zone& o, const std::chrono::system_clock::time_point& v) const { + int64_t count = static_cast(v.time_since_epoch().count()); + + int64_t nano_num = + std::chrono::system_clock::duration::period::ratio::num * + (1000000000 / std::chrono::system_clock::duration::period::ratio::den); + + int64_t nanosec = count % (1000000000 / nano_num) * nano_num; + int64_t sec = 0; + if (nanosec < 0) { + nanosec = 1000000000 + nanosec; + --sec; + } + sec += count + * std::chrono::system_clock::duration::period::ratio::num + / std::chrono::system_clock::duration::period::ratio::den; + if ((sec >> 34) == 0) { + uint64_t data64 = (nanosec << 34) | sec; + if ((data64 & 0xffffffff00000000L) == 0) { + // timestamp 32 + o.type = msgpack::type::EXT; + o.via.ext.size = 4; + char* p = static_cast(o.zone.allocate_no_align(o.via.ext.size + 1)); + p[0] = -1; + uint32_t data32 = static_cast(data64); + _msgpack_store32(&p[1], data32); + o.via.ext.ptr = p; + } + else { + // timestamp 64 + o.type = msgpack::type::EXT; + o.via.ext.size = 8; + char* p = static_cast(o.zone.allocate_no_align(o.via.ext.size + 1)); + p[0] = -1; + _msgpack_store64(&p[1], data64); + o.via.ext.ptr = p; + } + } + else { + // timestamp 96 + o.type = msgpack::type::EXT; + o.via.ext.size = 12; + char* p = static_cast(o.zone.allocate_no_align(o.via.ext.size + 1)); + p[0] = -1; + _msgpack_store32(&p[1], static_cast(nanosec)); + _msgpack_store64(&p[1 + 4], sec); + o.via.ext.ptr = p; + } + } +}; + +} // namespace adaptor + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V1_TYPE_CPP11_CHRONO_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/forward_list.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/forward_list.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/forward_list.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/forward_list.hpp index 395a1ff1f5b..c207c047254 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/forward_list.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/forward_list.hpp @@ -76,7 +76,7 @@ struct object_with_zone> { uint32_t size = checked_get_container_size(std::distance(v.begin(), v.end())); o.via.array.size = size; msgpack::object* p = static_cast( - o.zone.allocate_align(sizeof(msgpack::object)*size)); + o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.ptr = p; for(auto const& e : v) *p++ = msgpack::object(e, o.zone); } diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/tuple.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/tuple.hpp index 5fad147b189..08b14f5c4a7 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/tuple.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/tuple.hpp @@ -158,7 +158,7 @@ struct object_with_zone> { std::tuple const& v) const { uint32_t size = checked_get_container_size(sizeof...(Args)); o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = size; StdTupleToObjectWithZone::convert(o, v); } diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp index b4de2df5b94..bcd8fddc966 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp @@ -81,7 +81,7 @@ struct object_with_zone> { o.via.map.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; @@ -155,7 +155,7 @@ struct object_with_zone> { o.via.map.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp index 3e1da7662ba..44a3cc3b6a6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp @@ -78,7 +78,7 @@ struct object_with_zone> { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; @@ -147,7 +147,7 @@ struct object_with_zone> { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/byte.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/byte.hpp new file mode 100644 index 00000000000..a1d1204719e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/byte.hpp @@ -0,0 +1,74 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V1_TYPE_BYTE_HPP +#define MSGPACK_V1_TYPE_BYTE_HPP + +#if __cplusplus >= 201703 + +#include "msgpack/versioning.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" +#include "msgpack/adaptor/int_decl.hpp" +#include "msgpack/object.hpp" + +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond + +namespace adaptor { + +template <> +struct convert { + msgpack::object const& operator()(msgpack::object const& o, std::byte& v) const { + v = static_cast(type::detail::convert_integer(o)); + return o; + } +}; + +template <> +struct pack { + template + msgpack::packer& operator()(msgpack::packer& o, std::byte v) const { + o.pack_unsigned_char(static_cast(v)); + return o; + } +}; + +template <> +struct object { + void operator()(msgpack::object& o, std::byte v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = static_cast(v); + } +}; + +template <> +struct object_with_zone { + void operator()(msgpack::object::with_zone& o, const std::byte& v) const { + static_cast(o) << v; + } +}; + + +} // namespace adaptor + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond + +} // namespace msgpack + +#endif // __cplusplus >= 201703 + +#endif // MSGPACK_V1_TYPE_BYTE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/carray_byte.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/carray_byte.hpp new file mode 100644 index 00000000000..e2be6bc0ea5 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/carray_byte.hpp @@ -0,0 +1,109 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V1_TYPE_CARRAY_BYTE_HPP +#define MSGPACK_V1_TYPE_CARRAY_BYTE_HPP + +#if __cplusplus >= 201703 + +#include "msgpack/versioning.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" +#include "msgpack/adaptor/check_container_size.hpp" + +#include +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond + +namespace adaptor { + +template +struct convert { + msgpack::object const& operator()(msgpack::object const& o, std::byte(&v)[N]) const { + switch (o.type) { + case msgpack::type::BIN: + if (o.via.bin.size > N) { throw msgpack::type_error(); } + std::memcpy(v, o.via.bin.ptr, o.via.bin.size); + break; + case msgpack::type::STR: + if (o.via.str.size > N) { throw msgpack::type_error(); } + std::memcpy(v, o.via.str.ptr, o.via.str.size); + if (o.via.str.size < N) v[o.via.str.size] = std::byte{'\0'}; + break; + default: + throw msgpack::type_error(); + break; + } + return o; + } +}; + +template +struct pack { + template + msgpack::packer& operator()(msgpack::packer& o, const std::byte(&v)[N]) const { + std::byte const* p = v; + uint32_t size = checked_get_container_size(N); + o.pack_bin(size); + o.pack_bin_body(reinterpret_cast(p), size); + return o; + } +}; + +template +struct pack { + template + msgpack::packer& operator()(msgpack::packer& o, const std::byte(&v)[N]) const { + std::byte const* p = v; + uint32_t size = checked_get_container_size(N); + o.pack_bin(size); + o.pack_bin_body(reinterpret_cast(p), size); + return o; + } +}; + +template +struct object_with_zone { + void operator()(msgpack::object::with_zone& o, const std::byte(&v)[N]) const { + uint32_t size = checked_get_container_size(N); + o.type = msgpack::type::BIN; + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + o.via.bin.ptr = ptr; + o.via.bin.size = size; + std::memcpy(ptr, v, size); + } +}; + +template +struct object_with_zone { + void operator()(msgpack::object::with_zone& o, const std::byte(&v)[N]) const { + uint32_t size = checked_get_container_size(N); + o.type = msgpack::type::BIN; + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + o.via.bin.ptr = ptr; + o.via.bin.size = size; + std::memcpy(ptr, v, size); + } +}; + +} // namespace adaptor + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond + +} // namespace msgpack + +#endif // __cplusplus >= 201703 + +#endif // MSGPACK_V1_TYPE_CARRAY_BYTE_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp17/optional.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/optional.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp17/optional.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/optional.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp17/string_view.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/string_view.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/cpp17/string_view.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/string_view.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp new file mode 100644 index 00000000000..e291667edbd --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/cpp17/vector_byte.hpp @@ -0,0 +1,119 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V1_TYPE_VECTOR_BYTE_HPP +#define MSGPACK_V1_TYPE_VECTOR_BYTE_HPP + +#if __cplusplus >= 201703 + +#include "msgpack/versioning.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" +#include "msgpack/adaptor/check_container_size.hpp" + +#include +#include +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond + +namespace adaptor { + +template +struct convert > { + msgpack::object const& operator()(msgpack::object const& o, std::vector& v) const { + switch (o.type) { + case msgpack::type::BIN: + v.resize(o.via.bin.size); + if (o.via.bin.size != 0) { +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) + std::memcpy(&v.front(), o.via.bin.ptr, o.via.bin.size); +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) + } + break; + case msgpack::type::STR: + v.resize(o.via.str.size); + if (o.via.str.size != 0) { +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) + std::memcpy(&v.front(), o.via.str.ptr, o.via.str.size); +#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__) + } + break; + default: + throw msgpack::type_error(); + break; + } + return o; + } +}; + +template +struct pack > { + template + msgpack::packer& operator()(msgpack::packer& o, const std::vector& v) const { + uint32_t size = checked_get_container_size(v.size()); + o.pack_bin(size); + if (size != 0) { + o.pack_bin_body(reinterpret_cast(&v.front()), size); + } + + return o; + } +}; + +template +struct object > { + void operator()(msgpack::object& o, const std::vector& v) const { + uint32_t size = checked_get_container_size(v.size()); + o.type = msgpack::type::BIN; + if (size != 0) { + o.via.bin.ptr = reinterpret_cast(&v.front()); + } + o.via.bin.size = size; + } +}; + +template +struct object_with_zone > { + void operator()(msgpack::object::with_zone& o, const std::vector& v) const { + uint32_t size = checked_get_container_size(v.size()); + o.type = msgpack::type::BIN; + o.via.bin.size = size; + if (size != 0) { + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + o.via.bin.ptr = ptr; + std::memcpy(ptr, &v.front(), size); + } + } +}; + +} // namespace adaptor + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond + +} // namespace msgpack + +#endif // __cplusplus >= 201703 + +#endif // MSGPACK_V1_TYPE_VECTOR_BYTE_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/define.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/define.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/define.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/define.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/define_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/define_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/define_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/define_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/deque.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/deque.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/deque.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/deque.hpp index 6d42d6d88dd..41a0bef696e 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/deque.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/deque.hpp @@ -83,7 +83,7 @@ struct object_with_zone > { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp index 66e2aa637e8..c8158292601 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_array.hpp @@ -75,7 +75,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*1)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*1, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 1; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -118,7 +118,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*2)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*2, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 2; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -167,7 +167,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*3)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*3, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 3; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -222,7 +222,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*4)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*4, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 4; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -283,7 +283,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*5)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*5, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 5; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -350,7 +350,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*6)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*6, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 6; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -423,7 +423,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*7)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*7, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 7; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -502,7 +502,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*8)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*8, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 8; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -587,7 +587,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*9)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*9, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 9; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -678,7 +678,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*10)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*10, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 10; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -775,7 +775,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*11)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*11, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 11; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -878,7 +878,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*12)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*12, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 12; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -987,7 +987,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*13)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*13, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 13; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1102,7 +1102,7 @@ struct define_array void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*14)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*14, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 14; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1223,7 +1223,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*15)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*15, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 15; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1350,7 +1350,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*16)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*16, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 16; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1483,7 +1483,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*17)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*17, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 17; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1622,7 +1622,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*18)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*18, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 18; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1767,7 +1767,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*19)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*19, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 19; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -1918,7 +1918,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*20)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*20, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 20; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2075,7 +2075,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*21)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*21, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 21; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2238,7 +2238,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*22)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*22, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 22; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2407,7 +2407,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*23)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*23, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 23; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2582,7 +2582,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*24)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*24, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 24; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2763,7 +2763,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*25)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*25, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 25; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -2950,7 +2950,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*26)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*26, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 26; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -3143,7 +3143,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*27)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*27, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 27; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -3342,7 +3342,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*28)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*28, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 28; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -3547,7 +3547,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*29)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*29, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 29; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -3758,7 +3758,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*30)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*30, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 30; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -3975,7 +3975,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*31)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*31, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 31; o->via.array.ptr[0] = msgpack::object(a0, z); @@ -4198,7 +4198,7 @@ struct define_arraytype = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*32)); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*32, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = 32; o->via.array.ptr[0] = msgpack::object(a0, z); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_array_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_array_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_array_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp index 9e0acddd559..7869b98e77b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_map.hpp @@ -62,6 +62,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -83,7 +84,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*1)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*1, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 1; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -114,6 +115,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -142,7 +144,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*2)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*2, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 2; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -180,6 +182,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -215,7 +218,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*3)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*3, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 3; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -260,6 +263,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -302,7 +306,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*4)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*4, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 4; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -354,6 +358,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -403,7 +408,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*5)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*5, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 5; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -462,6 +467,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -518,7 +524,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*6)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*6, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 6; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -584,6 +590,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -647,7 +654,7 @@ struct define_map { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*7)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*7, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 7; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -720,6 +727,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -790,7 +798,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*8)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*8, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 8; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -870,6 +878,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -947,7 +956,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*9)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*9, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 9; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -1034,6 +1043,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -1118,7 +1128,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*10)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*10, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 10; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -1212,6 +1222,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -1303,7 +1314,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*11)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*11, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 11; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -1404,6 +1415,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -1502,7 +1514,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*12)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*12, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 12; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -1610,6 +1622,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -1715,7 +1728,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*13)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*13, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 13; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -1830,6 +1843,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -1942,7 +1956,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*14)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*14, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 14; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -2064,6 +2078,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -2183,7 +2198,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*15)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*15, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 15; o->via.map.ptr[0].key = msgpack::object(a0, z); @@ -2312,6 +2327,7 @@ struct define_map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.insert( std::map::value_type( std::string( @@ -2438,7 +2454,7 @@ struct define_maptype = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*16)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*16, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = 16; o->via.map.ptr[0].key = msgpack::object(a0, z); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp index f10a2d77ca7..88a0b3b55df 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp @@ -13506,7 +13506,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*1)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*1, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 1; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13519,7 +13519,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*2)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*2, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 2; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13533,7 +13533,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*3)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*3, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 3; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13548,7 +13548,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*4)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*4, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 4; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13564,7 +13564,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*5)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*5, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 5; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13581,7 +13581,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*6)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*6, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 6; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13599,7 +13599,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*7)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*7, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 7; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13618,7 +13618,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*8)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*8, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 8; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13638,7 +13638,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*9)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*9, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 9; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13659,7 +13659,7 @@ struct object_with_zone > { msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*10)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*10, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 10; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13681,7 +13681,7 @@ struct object_with_zone msgpack::object::with_zone& o, const type::tuple& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*11)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*11, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 11; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13704,7 +13704,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*12)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*12, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 12; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13728,7 +13728,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*13)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*13, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 13; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13753,7 +13753,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*14)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*14, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 14; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13779,7 +13779,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*15)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*15, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 15; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13806,7 +13806,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*16)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*16, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 16; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13834,7 +13834,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*17)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*17, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 17; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13863,7 +13863,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*18)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*18, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 18; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13893,7 +13893,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*19)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*19, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 19; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13924,7 +13924,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*20)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*20, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 20; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13956,7 +13956,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*21)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*21, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 21; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -13989,7 +13989,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*22)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*22, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 22; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14023,7 +14023,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*23)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*23, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 23; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14058,7 +14058,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*24)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*24, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 24; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14094,7 +14094,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*25)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*25, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 25; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14131,7 +14131,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*26)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*26, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 26; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14169,7 +14169,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*27)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*27, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 27; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14208,7 +14208,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*28)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*28, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 28; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14248,7 +14248,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*29)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*29, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 29; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14289,7 +14289,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*30)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*30, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 30; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14331,7 +14331,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*31)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*31, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 31; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); @@ -14374,7 +14374,7 @@ struct object_with_zone& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*32)); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*32, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = 32; o.via.array.ptr[0] = msgpack::object(v.template get<0>(), o.zone); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp new file mode 100644 index 00000000000..f9e29ea61a0 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp @@ -0,0 +1,45 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V1_CPP11_CONVERT_HELPER_HPP +#define MSGPACK_V1_CPP11_CONVERT_HELPER_HPP + +#include + +#include + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond +namespace type { + +template +inline typename std::enable_if< + has_as::value +>::type +convert_helper(msgpack::object const& o, T& t) { + t = o.as(); +} +template +inline typename std::enable_if< + !has_as::value +>::type +convert_helper(msgpack::object const& o, T& t) { + o.convert(t); +} + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond +} // namespace msgpack + +#endif // MSGPACK_V1_CPP11_CONVERT_HELPER_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp index b51a4f6d625..bec4a053bd4 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp @@ -11,6 +11,7 @@ #define MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP #include "msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp" +#include "msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp" #include @@ -31,7 +32,7 @@ struct define_array_imp { define_array_imp::unpack(o, t); const size_t size = o.via.array.size; if(size <= N-1) { return; } - o.via.array.ptr[N-1].convert(std::get(t)); + convert_helper(o.via.array.ptr[N-1], std::get(t)); } static void object(msgpack::object* o, msgpack::zone& z, Tuple const& t) { define_array_imp::object(o, z, t); @@ -48,7 +49,7 @@ struct define_array_imp { static void unpack(msgpack::object const& o, Tuple& t) { const size_t size = o.via.array.size; if(size <= 0) { return; } - o.via.array.ptr[0].convert(std::get<0>(t)); + convert_helper(o.via.array.ptr[0], std::get<0>(t)); } static void object(msgpack::object* o, msgpack::zone& z, Tuple const& t) { o->via.array.ptr[0] = msgpack::object(std::get<0>(t), z); @@ -77,7 +78,7 @@ struct define_array { void msgpack_object(msgpack::object* o, msgpack::zone& z) const { o->type = msgpack::type::ARRAY; - o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*sizeof...(Args))); + o->via.array.ptr = static_cast(z.allocate_align(sizeof(msgpack::object)*sizeof...(Args), MSGPACK_ZONE_ALIGNOF(msgpack::object))); o->via.array.size = sizeof...(Args); define_array_imp, sizeof...(Args)>::object(o, z, a); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp index 022b8ad6eb9..d1ab70150f3 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp @@ -11,6 +11,7 @@ #define MSGPACK_V1_CPP11_DEFINE_MAP_HPP #include "msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp" +#include "msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp" #include #include @@ -34,7 +35,7 @@ struct define_map_imp { define_map_imp::unpack(o, t, kvmap); auto it = kvmap.find(std::get(t)); if (it != kvmap.end()) { - it->second->convert(std::get(t)); + convert_helper(*it->second, std::get(t)); } } static void object(msgpack::object* o, msgpack::zone& z, Tuple const& t) { @@ -71,6 +72,7 @@ struct define_map { if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); } std::map kvmap; for (uint32_t i = 0; i < o.via.map.size; ++i) { + if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); } kvmap.emplace( std::string( o.via.map.ptr[i].key.via.str.ptr, @@ -83,7 +85,7 @@ struct define_map { { static_assert(sizeof...(Args) % 2 == 0, ""); o->type = msgpack::type::MAP; - o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*sizeof...(Args)/2)); + o->via.map.ptr = static_cast(z.allocate_align(sizeof(msgpack::object_kv)*sizeof...(Args)/2, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); o->via.map.size = sizeof...(Args) / 2; define_map_imp, sizeof...(Args)>::object(o, z, a); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp index 1a0a3760f56..9aa0c31a499 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp @@ -203,7 +203,7 @@ template msgpack::object::with_zone& o, msgpack::type::tuple const& v) const { o.type = msgpack::type::ARRAY; - o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*sizeof...(Args))); + o.via.array.ptr = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*sizeof...(Args), MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.size = sizeof...(Args); MsgpackTupleToObjectWithZone::convert(o, v); } diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/ext.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/ext.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/ext.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/ext.hpp index b81c0bcd4f3..de375975fb4 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/ext.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/ext.hpp @@ -43,10 +43,10 @@ class ext { return static_cast(m_data[0]); } const char* data() const { - return &m_data[1]; + return &m_data[0] + 1; } char* data() { - return &m_data[1]; + return &m_data[0] + 1; } uint32_t size() const { return static_cast(m_data.size()) - 1; @@ -104,7 +104,7 @@ struct object_with_zone { // size limit has already been checked at ext's constructor uint32_t size = v.size(); o.type = msgpack::type::EXT; - char* ptr = static_cast(o.zone.allocate_align(size + 1)); + char* ptr = static_cast(o.zone.allocate_align(size + 1, MSGPACK_ZONE_ALIGNOF(char))); o.via.ext.ptr = ptr; o.via.ext.size = size; ptr[0] = static_cast(v.type()); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/ext_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/ext_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/ext_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/ext_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/fixint.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/fixint.hpp similarity index 88% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/fixint.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/fixint.hpp index eba647ed9cd..7361edf9d6f 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/fixint.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/fixint.hpp @@ -201,75 +201,91 @@ struct object { template <> struct object { - void operator()(msgpack::object& o, type::fix_uint8 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint8 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint16 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint16 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint32 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint32 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object { - void operator()(msgpack::object& o, type::fix_uint64 v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v.get(); } + void operator()(msgpack::object& o, type::fix_uint64 v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v.get(); + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int8 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int8 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int16 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int16 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int32 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int32 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_int64 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_int64 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint8 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint8 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint16 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint16 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint32 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint32 v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, type::fix_uint64 v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, type::fix_uint64 v) const { + static_cast(o) << v; + } }; } // namespace adaptor diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/fixint_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/fixint_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/fixint_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/fixint_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/float.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/float.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/float.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/float.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/int.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/int.hpp similarity index 87% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/int.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/int.hpp index 45d90586978..962e66ff9ea 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/int.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/int.hpp @@ -82,7 +82,8 @@ struct object_char_sign { template <> struct object_char_sign { static void make(msgpack::object& o, char v) { - o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; } }; @@ -320,99 +321,120 @@ struct object { template <> struct object { - void operator()(msgpack::object& o, unsigned char v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned char v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned short v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned short v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned int v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned int v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned long v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned long v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object { - void operator()(msgpack::object& o, unsigned long long v) const - { o.type = msgpack::type::POSITIVE_INTEGER, o.via.u64 = v; } + void operator()(msgpack::object& o, unsigned long long v) const { + o.type = msgpack::type::POSITIVE_INTEGER; + o.via.u64 = v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed short v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed short v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed int v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed int v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, signed long v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, signed long v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, const signed long long& v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, const signed long long& v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned char v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned char v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned short v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned short v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned int v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned int v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, unsigned long v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, unsigned long v) const { + static_cast(o) << v; + } }; template <> struct object_with_zone { - void operator()(msgpack::object::with_zone& o, const unsigned long long& v) const - { static_cast(o) << v; } + void operator()(msgpack::object::with_zone& o, const unsigned long long& v) const { + static_cast(o) << v; + } }; } // namespace adaptor diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/int_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/int_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/int_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/int_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/list.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/list.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/list.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/list.hpp index 4d68065c5e6..d16c8d21923 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/list.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/list.hpp @@ -81,7 +81,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/map.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/map.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/map.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/map.hpp index 97dd5c09cfd..2c1793e16e2 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/map.hpp @@ -109,7 +109,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; @@ -195,7 +195,7 @@ struct object_with_zone > { else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; @@ -288,7 +288,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/msgpack_tuple.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/msgpack_tuple.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/msgpack_tuple.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/msgpack_tuple.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/msgpack_tuple_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/nil.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/nil.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/nil.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/nil.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/nil_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/nil_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/nil_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/nil_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/pair.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/pair.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/pair.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/pair.hpp index 700a93b04df..890abc2b87c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/pair.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/pair.hpp @@ -64,7 +64,7 @@ template struct object_with_zone > { void operator()(msgpack::object::with_zone& o, const std::pair& v) const { o.type = msgpack::type::ARRAY; - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*2)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*2, MSGPACK_ZONE_ALIGNOF(msgpack::object))); o.via.array.ptr = p; o.via.array.size = 2; p[0] = msgpack::object(v.first, o.zone); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/raw.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/raw.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/raw.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/raw.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/raw_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/raw_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/set.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/set.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/set.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/set.hpp index fb98f8000a3..96abe25f022 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/set.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/set.hpp @@ -87,7 +87,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; @@ -163,7 +163,7 @@ struct object_with_zone > { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/size_equal_only.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/size_equal_only.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/size_equal_only.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/size_equal_only.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/size_equal_only_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/size_equal_only_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/size_equal_only_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/size_equal_only_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/string.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/string.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/string.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/string.hpp index a4ce8a2fc78..ca7d3e509f8 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/string.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/string.hpp @@ -69,7 +69,7 @@ struct object_with_zone { void operator()(msgpack::object::with_zone& o, const std::string& v) const { uint32_t size = checked_get_container_size(v.size()); o.type = msgpack::type::STR; - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.str.ptr = ptr; o.via.str.size = size; std::memcpy(ptr, v.data(), v.size()); diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_map.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_map.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_map.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_map.hpp index 62e77c11f9f..9c8190e855c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_map.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_map.hpp @@ -84,7 +84,7 @@ struct object_with_zone o.via.map.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; @@ -141,7 +141,7 @@ struct object_with_zone(o.zone.allocate_align(sizeof(msgpack::object_kv)*size)); + msgpack::object_kv* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object_kv)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); msgpack::object_kv* const pend = p + size; o.via.map.ptr = p; o.via.map.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_set.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_set.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_set.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_set.hpp index fcc76f3f00e..dd6c0448fc6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/adaptor/tr1/unordered_set.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/tr1/unordered_set.hpp @@ -82,7 +82,7 @@ struct object_with_zone o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; @@ -136,7 +136,7 @@ struct object_with_zone(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/v4raw.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/v4raw.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/v4raw.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/v4raw.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/v4raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/v4raw_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/v4raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/v4raw_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector.hpp index b23a18c1757..2a0345b1297 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector.hpp @@ -89,7 +89,7 @@ struct object_with_zone > { } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_bool.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_bool.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_bool.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_bool.hpp index d1b21361210..d6ec2459271 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_bool.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_bool.hpp @@ -65,7 +65,7 @@ struct object_with_zone > { o.via.array.size = 0; } else { uint32_t size = checked_get_container_size(v.size()); - msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size)); + msgpack::object* p = static_cast(o.zone.allocate_align(sizeof(msgpack::object)*size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); msgpack::object* const pend = p + size; o.via.array.ptr = p; o.via.array.size = size; diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_char.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_char.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_char.hpp index a89d54d22a7..315dad67856 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_char.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_char.hpp @@ -96,7 +96,7 @@ struct object_with_zone > { o.type = msgpack::type::BIN; o.via.bin.size = size; if (size != 0) { - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; std::memcpy(ptr, &v.front(), size); } diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_unsigned_char.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_unsigned_char.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_unsigned_char.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_unsigned_char.hpp index c79e5748d43..9db72fe7df6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/adaptor/vector_unsigned_char.hpp @@ -96,7 +96,7 @@ struct object_with_zone > { o.type = msgpack::type::BIN; o.via.bin.size = size; if (size != 0) { - char* ptr = static_cast(o.zone.allocate_align(size)); + char* ptr = static_cast(o.zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); o.via.bin.ptr = ptr; std::memcpy(ptr, &v.front(), size); } diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/cpp_config.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/cpp_config.hpp similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/v1/cpp_config.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/cpp_config.hpp index a7f529d21c9..0eb518d833d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/cpp_config.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/cpp_config.hpp @@ -127,7 +127,11 @@ template struct is_pointer : detail::is_pointer_helper= 201402L +#if defined(_MSC_VER) +#define MSGPACK_DEPRECATED(msg) __declspec(deprecated(msg)) +#else // _MSC_VER 1914+ with /Zc:__cplusplus, @see https://docs.microsoft.com/cpp/build/reference/zc-cplusplus #define MSGPACK_DEPRECATED(msg) [[deprecated(msg)]] +#endif #else // __cplusplus >= 201402L #define MSGPACK_DEPRECATED(msg) #endif // __cplusplus >= 201402L diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/cpp_config_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/cpp_config_decl.hpp similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/v1/cpp_config_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/cpp_config_decl.hpp index 43a486005dc..c9752f237cf 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/cpp_config_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/cpp_config_decl.hpp @@ -128,4 +128,10 @@ MSGPACK_API_VERSION_NAMESPACE(v1) { #endif // MSGPACK_USE_CPP03 +#if defined(__has_include) +#define MSGPACK_HAS_INCLUDE __has_include +#else // defined(__has_include) +#define MSGPACK_HAS_INCLUDE(header) 0 +#endif // defined(__has_include) + #endif // MSGPACK_V1_CPP_CONFIG_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone.hpp index 17bff2e2b46..73abe69416c 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone.hpp @@ -223,7 +223,9 @@ class zone { template static void object_delete(void* obj); - void* allocate_expand(size_t size); + static char* get_aligned(char* ptr, size_t align); + + char* allocate_expand(size_t size); private: zone(const zone&); zone& operator=(const zone&); @@ -233,37 +235,42 @@ inline zone::zone(size_t chunk_size) /* throw() */ :m_chunk_size(chunk_size), m_ { } -inline void* zone::allocate_align(size_t size, size_t align) +inline char* zone::get_aligned(char* ptr, size_t align) { - char* aligned = + return reinterpret_cast( reinterpret_cast( - (m_chunk_list.m_ptr + (align - 1))) / align * align); + (ptr + (align - 1))) / align * align); +} + +inline void* zone::allocate_align(size_t size, size_t align) +{ + char* aligned = get_aligned(m_chunk_list.m_ptr, align); size_t adjusted_size = size + (aligned - m_chunk_list.m_ptr); - if(m_chunk_list.m_free >= adjusted_size) { - m_chunk_list.m_free -= adjusted_size; - m_chunk_list.m_ptr += adjusted_size; - return aligned; - } - return reinterpret_cast( - reinterpret_cast( - allocate_expand(size + (align - 1))) / align * align); + if (m_chunk_list.m_free < adjusted_size) { + size_t enough_size = size + align - 1; + char* ptr = allocate_expand(enough_size); + aligned = get_aligned(ptr, align); + adjusted_size = size + (aligned - m_chunk_list.m_ptr); + } + m_chunk_list.m_free -= adjusted_size; + m_chunk_list.m_ptr += adjusted_size; + return aligned; } inline void* zone::allocate_no_align(size_t size) { + char* ptr = m_chunk_list.m_ptr; if(m_chunk_list.m_free < size) { - return allocate_expand(size); + ptr = allocate_expand(size); } - - char* ptr = m_chunk_list.m_ptr; m_chunk_list.m_free -= size; m_chunk_list.m_ptr += size; return ptr; } -inline void* zone::allocate_expand(size_t size) +inline char* zone::allocate_expand(size_t size) { chunk_list* const cl = &m_chunk_list; @@ -285,8 +292,8 @@ inline void* zone::allocate_expand(size_t size) c->m_next = cl->m_head; cl->m_head = c; - cl->m_free = sz - size; - cl->m_ptr = ptr + size; + cl->m_free = sz; + cl->m_ptr = ptr; return ptr; } @@ -345,7 +352,7 @@ inline std::size_t aligned_size( template T* zone::allocate() { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -364,7 +371,7 @@ T* zone::allocate() template T* zone::allocate(A1 a1) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -383,7 +390,7 @@ T* zone::allocate(A1 a1) template T* zone::allocate(A1 a1, A2 a2) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -402,7 +409,7 @@ T* zone::allocate(A1 a1, A2 a2) template T* zone::allocate(A1 a1, A2 a2, A3 a3) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -421,7 +428,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -440,7 +447,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -459,7 +466,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -478,7 +485,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -497,7 +504,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -516,7 +523,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -535,7 +542,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -554,7 +561,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -573,7 +580,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -592,7 +599,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -611,7 +618,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { @@ -630,7 +637,7 @@ T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, template T* zone::allocate(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, A10 a10, A11 a11, A12 a12, A13 a13, A14 a14, A15 a15) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone_decl.hpp similarity index 78% rename from lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone_decl.hpp index fd087ffa793..66d4cac0a53 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp03_zone_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp03_zone_decl.hpp @@ -24,6 +24,14 @@ #define MSGPACK_ZONE_ALIGN sizeof(void*) #endif +#if defined(_MSC_VER) +#define MSGPACK_ZONE_ALIGNOF(type) __alignof(type) +#else +#define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type) +#endif +// For a compiler that doesn't support __alignof__: +// #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN + namespace msgpack { diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone.hpp index 377e907267d..04659ba60b0 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone.hpp @@ -184,7 +184,6 @@ class zone { void swap(zone& o); - static void* operator new(std::size_t size) { void* p = ::malloc(size); @@ -220,44 +219,51 @@ class zone { template static void object_delete(void* obj); - void* allocate_expand(size_t size); + static char* get_aligned(char* ptr, size_t align); + + char* allocate_expand(size_t size); }; inline zone::zone(size_t chunk_size) noexcept:m_chunk_size(chunk_size), m_chunk_list(m_chunk_size) { } -inline void* zone::allocate_align(size_t size, size_t align) +inline char* zone::get_aligned(char* ptr, size_t align) { - char* aligned = + return reinterpret_cast( reinterpret_cast( - (m_chunk_list.m_ptr + (align - 1))) / align * align); + (ptr + (align - 1))) / align * align); +} + +inline void* zone::allocate_align(size_t size, size_t align) +{ + char* aligned = get_aligned(m_chunk_list.m_ptr, align); size_t adjusted_size = size + (aligned - m_chunk_list.m_ptr); - if(m_chunk_list.m_free >= adjusted_size) { - m_chunk_list.m_free -= adjusted_size; - m_chunk_list.m_ptr += adjusted_size; - return aligned; + if (m_chunk_list.m_free < adjusted_size) { + size_t enough_size = size + align - 1; + char* ptr = allocate_expand(enough_size); + aligned = get_aligned(ptr, align); + adjusted_size = size + (aligned - m_chunk_list.m_ptr); } - return reinterpret_cast( - reinterpret_cast( - allocate_expand(size + (align - 1))) / align * align); + m_chunk_list.m_free -= adjusted_size; + m_chunk_list.m_ptr += adjusted_size; + return aligned; } inline void* zone::allocate_no_align(size_t size) { + char* ptr = m_chunk_list.m_ptr; if(m_chunk_list.m_free < size) { - return allocate_expand(size); + ptr = allocate_expand(size); } - - char* ptr = m_chunk_list.m_ptr; m_chunk_list.m_free -= size; m_chunk_list.m_ptr += size; return ptr; } -inline void* zone::allocate_expand(size_t size) +inline char* zone::allocate_expand(size_t size) { chunk_list* const cl = &m_chunk_list; @@ -279,8 +285,8 @@ inline void* zone::allocate_expand(size_t size) c->m_next = cl->m_head; cl->m_head = c; - cl->m_free = sz - size; - cl->m_ptr = ptr + size; + cl->m_free = sz; + cl->m_ptr = ptr; return ptr; } @@ -329,7 +335,7 @@ inline void zone::undo_allocate(size_t size) template T* zone::allocate(Args... args) { - void* x = allocate_align(sizeof(T)); + void* x = allocate_align(sizeof(T), MSGPACK_ZONE_ALIGNOF(T)); try { m_finalizer_array.push(&zone::object_destruct, x); } catch (...) { diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone_decl.hpp similarity index 79% rename from lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone_decl.hpp index c2614e57729..36750184489 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/detail/cpp11_zone_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/detail/cpp11_zone_decl.hpp @@ -26,6 +26,14 @@ #define MSGPACK_ZONE_ALIGN sizeof(void*) #endif +#if defined(_MSC_VER) +#define MSGPACK_ZONE_ALIGNOF(type) __alignof(type) +#else +#define MSGPACK_ZONE_ALIGNOF(type) __alignof__(type) +#endif +// For a compiler that doesn't support __alignof__: +// #define MSGPACK_ZONE_ALIGNOF(type) MSGPACK_ZONE_ALIGN + namespace msgpack { /// @cond diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/fbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/fbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/fbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/fbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/fbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/fbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/fbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/fbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/iterator.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/iterator.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/iterator.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/iterator.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/iterator_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/iterator_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/iterator_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/iterator_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/meta.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/meta.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/meta.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/meta.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/meta_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/meta_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/meta_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/meta_decl.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/v1/object.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/object.hpp new file mode 100644 index 00000000000..23f1ab1fcf3 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v1/object.hpp @@ -0,0 +1,1240 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2014 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V1_OBJECT_HPP +#define MSGPACK_V1_OBJECT_HPP + +#include "msgpack/object_decl.hpp" +#include "msgpack/adaptor/check_container_size.hpp" + +#include +#include +#include +#include +#include +#include +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v1) { +/// @endcond + +struct object_kv { + msgpack::object key; + msgpack::object val; +}; + +struct object::with_zone : msgpack::object { + with_zone(msgpack::zone& z) : zone(z) { } + msgpack::zone& zone; +private: + with_zone(); +}; + + +/// The class holds object and zone +class object_handle { +public: + /// Constructor that creates nil object and null zone. + object_handle() {} + + /// Constructor that creates an object_handle holding object `obj` and zone `z`. + /** + * @param obj object + * @param z zone + */ + object_handle( + msgpack::object const& obj, +#if defined(MSGPACK_USE_CPP03) + msgpack::unique_ptr z +#else // defined(MSGPACK_USE_CPP03) + msgpack::unique_ptr&& z +#endif // defined(MSGPACK_USE_CPP03) + ) : + m_obj(obj), m_zone(msgpack::move(z)) { } + + void set(msgpack::object const& obj) + { m_obj = obj; } + + /// Get object reference + /** + * @return object + */ + const msgpack::object& get() const + { return m_obj; } + + /** + * @return object (to mimic smart pointers). + */ + const msgpack::object& operator*() const + { return get(); } + + /** + * @return the address of the object (to mimic smart pointers). + */ + const msgpack::object* operator->() const + { return &get(); } + + /// Get unique_ptr reference of zone. + /** + * @return unique_ptr reference of zone + */ + msgpack::unique_ptr& zone() + { return m_zone; } + + /// Get unique_ptr const reference of zone. + /** + * @return unique_ptr const reference of zone + */ + const msgpack::unique_ptr& zone() const + { return m_zone; } + +#if defined(MSGPACK_USE_CPP03) + struct object_handle_ref { + object_handle_ref(object_handle* oh):m_oh(oh) {} + object_handle* m_oh; + }; + + object_handle(object_handle& other): + m_obj(other.m_obj), + m_zone(msgpack::move(other.m_zone)) { + } + + object_handle(object_handle_ref ref): + m_obj(ref.m_oh->m_obj), + m_zone(msgpack::move(ref.m_oh->m_zone)) { + } + + object_handle& operator=(object_handle& other) { + m_obj = other.m_obj; + m_zone = msgpack::move(other.m_zone); + return *this; + } + + object_handle& operator=(object_handle_ref ref) { + m_obj = ref.m_oh->m_obj; + m_zone = msgpack::move(ref.m_oh->m_zone); + return *this; + } + + operator object_handle_ref() { + return object_handle_ref(this); + } +#endif // defined(MSGPACK_USE_CPP03) + +private: + msgpack::object m_obj; + msgpack::unique_ptr m_zone; +}; + +namespace detail { + +template +inline std::size_t add_ext_type_size(std::size_t size) { + return size + 1; +} + +template <> +inline std::size_t add_ext_type_size<4>(std::size_t size) { + return size == 0xffffffff ? size : size + 1; +} + +} // namespace detail +class object_parser { +private: + enum next_ret { + cont, + finish, + abort + }; + struct elem { + elem(msgpack::object const* p, std::size_t r) + : rest(r), is_map(false), is_key(false) { + as.obj_ptr = p; + } + + elem(msgpack::object_kv const* p, std::size_t r) + : rest(r), is_map(true), is_key(true) { + as.kv_ptr = p; + } + + msgpack::object const& get() const { + if (is_map) { + if (is_key) { + return as.kv_ptr->key; + } + else { + return as.kv_ptr->val; + } + } + else { + return *as.obj_ptr; + } + } + + template + next_ret next(Visitor& v) { + if (rest == 0) { + if (is_map) { + if (!v.end_map()) return abort; + } + else { + if (!v.end_array()) return abort; + } + return finish; + } + else { + if (is_map) { + if (is_key) { + if (!v.end_map_key()) return abort; + if (!v.start_map_value()) return abort; + is_key = false; + } + else { + if (!v.end_map_value()) return abort; + --rest; + if (rest == 0) { + if (!v.end_map()) return abort; + return finish; + } + if (!v.start_map_key()) return abort; + ++as.kv_ptr; + is_key = true; + } + } + else { + if (!v.end_array_item()) return abort; + --rest; + if (rest == 0) { + if (!v.end_array()) return abort; + return finish; + } + if (!v.start_array_item()) return abort; + ++as.obj_ptr; + } + return cont; + } + } + + union { + msgpack::object const* obj_ptr; + msgpack::object_kv const* kv_ptr; + } as; + std::size_t rest; + bool is_map; + bool is_key; + }; +public: + explicit object_parser(msgpack::object const& obj):m_current(&obj) {} + template + void parse(Visitor& v) { + while (true) { + bool start_collection = false; + switch(m_current->type) { + case msgpack::type::NIL: + if (!v.visit_nil()) return; + break; + case msgpack::type::BOOLEAN: + if (!v.visit_boolean(m_current->via.boolean)) return; + break; + case msgpack::type::POSITIVE_INTEGER: + if (!v.visit_positive_integer(m_current->via.u64)) return; + break; + case msgpack::type::NEGATIVE_INTEGER: + if (!v.visit_negative_integer(m_current->via.i64)) return; + break; + case msgpack::type::FLOAT32: + if (!v.visit_float32(static_cast(m_current->via.f64))) return; + break; + case msgpack::type::FLOAT64: + if (!v.visit_float64(m_current->via.f64)) return; + break; + case msgpack::type::STR: + if (!v.visit_str(m_current->via.str.ptr, m_current->via.str.size)) return; + break; + case msgpack::type::BIN: + if (!v.visit_bin(m_current->via.bin.ptr, m_current->via.bin.size)) return; + break; + case msgpack::type::EXT: + msgpack::detail::check_container_size(m_current->via.ext.size); + if (!v.visit_ext(m_current->via.ext.ptr, m_current->via.ext.size + 1)) return; + break; + case msgpack::type::ARRAY: + if (!v.start_array(m_current->via.array.size)) return; + m_ctx.push_back(elem(m_current->via.array.ptr, m_current->via.array.size)); + start_collection = m_current->via.array.size != 0; + if (start_collection) { + if (!v.start_array_item()) return; + } + break; + case msgpack::type::MAP: + if (!v.start_map(m_current->via.map.size)) return; + m_ctx.push_back(elem(m_current->via.map.ptr, m_current->via.map.size)); + start_collection = m_current->via.map.size != 0; + if (start_collection) { + if (!v.start_map_key()) return; + } + break; + default: + throw msgpack::type_error(); + break; + } + if (m_ctx.empty()) return; + if (!start_collection) { + while (true) { + next_ret r = m_ctx.back().next(v); + if (r == finish) { + m_ctx.pop_back(); + if (m_ctx.empty()) return; + } + else if (r == cont) { + break; + } + else { + // abort + return; + } + } + } + m_current = &m_ctx.back().get(); + } + } +private: + msgpack::object const* m_current; + std::vector m_ctx; +}; + +template +struct object_pack_visitor { + explicit object_pack_visitor(msgpack::packer& pk) + :m_packer(pk) {} + bool visit_nil() { + m_packer.pack_nil(); + return true; + } + bool visit_boolean(bool v) { + if (v) m_packer.pack_true(); + else m_packer.pack_false(); + return true; + } + bool visit_positive_integer(uint64_t v) { + m_packer.pack_uint64(v); + return true; + } + bool visit_negative_integer(int64_t v) { + m_packer.pack_int64(v); + return true; + } + bool visit_float32(float v) { + m_packer.pack_float(v); + return true; + } + bool visit_float64(double v) { + m_packer.pack_double(v); + return true; + } + bool visit_str(const char* v, uint32_t size) { + m_packer.pack_str(size); + m_packer.pack_str_body(v, size); + return true; + } + bool visit_bin(const char* v, uint32_t size) { + m_packer.pack_bin(size); + m_packer.pack_bin_body(v, size); + return true; + } + bool visit_ext(const char* v, uint32_t size) { + m_packer.pack_ext(size, *v); + m_packer.pack_ext_body(v, size); + return true; + } + bool start_array(uint32_t num_elements) { + m_packer.pack_array(num_elements); + return true; + } + bool start_array_item() { + return true; + } + bool end_array_item() { + return true; + } + bool end_array() { + return true; + } + bool start_map(uint32_t num_kv_pairs) { + m_packer.pack_map(num_kv_pairs); + return true; + } + bool start_map_key() { + return true; + } + bool end_map_key() { + return true; + } + bool start_map_value() { + return true; + } + bool end_map_value() { + return true; + } + bool end_map() { + return true; + } +private: + msgpack::packer& m_packer; +}; + + +struct object_stringize_visitor { + explicit object_stringize_visitor(std::ostream& os) + :m_os(os) {} + bool visit_nil() { + m_os << "null"; + return true; + } + bool visit_boolean(bool v) { + if (v) m_os << "true"; + else m_os << "false"; + return true; + } + bool visit_positive_integer(uint64_t v) { + m_os << v; + return true; + } + bool visit_negative_integer(int64_t v) { + m_os << v; + return true; + } + bool visit_float32(float v) { + m_os << v; + return true; + } + bool visit_float64(double v) { + m_os << v; + return true; + } + bool visit_str(const char* v, uint32_t size) { + m_os << '"'; + for (uint32_t i = 0; i < size; ++i) { + char c = v[i]; + switch (c) { + case '\\': + m_os << "\\\\"; + break; + case '"': + m_os << "\\\""; + break; + case '/': + m_os << "\\/"; + break; + case '\b': + m_os << "\\b"; + break; + case '\f': + m_os << "\\f"; + break; + case '\n': + m_os << "\\n"; + break; + case '\r': + m_os << "\\r"; + break; + case '\t': + m_os << "\\t"; + break; + default: { + unsigned int code = static_cast(c); + if (code < 0x20 || code == 0x7f) { + std::ios::fmtflags flags(m_os.flags()); + m_os << "\\u" << std::hex << std::setw(4) << std::setfill('0') << (code & 0xff); + m_os.flags(flags); + } + else { + m_os << c; + } + } break; + } + } + m_os << '"'; + return true; + } + bool visit_bin(const char* v, uint32_t size) { + (m_os << '"').write(v, size) << '"'; + return true; + } + bool visit_ext(const char* /*v*/, uint32_t /*size*/) { + m_os << "EXT"; + return true; + } + bool start_array(uint32_t num_elements) { + m_current_size.push_back(num_elements); + m_os << "["; + return true; + } + bool start_array_item() { + return true; + } + bool end_array_item() { + --m_current_size.back(); + if (m_current_size.back() != 0) { + m_os << ","; + } + return true; + } + bool end_array() { + m_current_size.pop_back(); + m_os << "]"; + return true; + } + bool start_map(uint32_t num_kv_pairs) { + m_current_size.push_back(num_kv_pairs); + m_os << "{"; + return true; + } + bool start_map_key() { + return true; + } + bool end_map_key() { + m_os << ":"; + return true; + } + bool start_map_value() { + return true; + } + bool end_map_value() { + --m_current_size.back(); + if (m_current_size.back() != 0) { + m_os << ","; + } + return true; + } + bool end_map() { + m_current_size.pop_back(); + m_os << "}"; + return true; + } +private: + std::ostream& m_os; + std::vector m_current_size; +}; + +struct aligned_zone_size_visitor { + explicit aligned_zone_size_visitor(std::size_t s) + :m_size(s) {} + bool visit_nil() { + return true; + } + bool visit_boolean(bool) { + return true; + } + bool visit_positive_integer(uint64_t) { + return true; + } + bool visit_negative_integer(int64_t) { + return true; + } + bool visit_float32(float) { + return true; + } + bool visit_float64(double) { + return true; + } + bool visit_str(const char*, uint32_t size) { + m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char)); + return true; + } + bool visit_bin(const char*, uint32_t size) { + m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char)); + return true; + } + bool visit_ext(const char*, uint32_t size) { + m_size += msgpack::aligned_size(size, MSGPACK_ZONE_ALIGNOF(char)); + return true; + } + bool start_array(uint32_t num_elements) { + m_size += msgpack::aligned_size( + sizeof(msgpack::object) * num_elements, + MSGPACK_ZONE_ALIGNOF(msgpack::object)); + return true; + } + bool start_array_item() { + return true; + } + bool end_array_item() { + return true; + } + bool end_array() { + return true; + } + bool start_map(uint32_t num_kv_pairs) { + m_size += msgpack::aligned_size( + sizeof(msgpack::object_kv) * num_kv_pairs, + MSGPACK_ZONE_ALIGNOF(msgpack::object_kv)); + return true; + } + bool start_map_key() { + return true; + } + bool end_map_key() { + return true; + } + bool start_map_value() { + return true; + } + bool end_map_value() { + return true; + } + bool end_map() { + return true; + } +private: + std::size_t m_size; +}; + +inline std::size_t aligned_zone_size(msgpack::object const& obj) { + std::size_t s = 0; + aligned_zone_size_visitor vis(s); + msgpack::object_parser(obj).parse(vis); + return s; +} + +/// clone object +/** + * Clone (deep copy) object. + * The copied object is located on newly allocated zone. + * @param obj copy source object + * + * @return object_handle that holds deep copied object and zone. + */ +inline object_handle clone(msgpack::object const& obj) { + std::size_t size = msgpack::aligned_zone_size(obj); + msgpack::unique_ptr z(size == 0 ? MSGPACK_NULLPTR : new msgpack::zone(size)); + msgpack::object newobj = z.get() ? msgpack::object(obj, *z) : obj; + return object_handle(newobj, msgpack::move(z)); +} + +template +inline object::implicit_type::operator T() { return obj.as(); } + +namespace detail { +template +struct packer_serializer { + static msgpack::packer& pack(msgpack::packer& o, const T& v) { + v.msgpack_pack(o); + return o; + } +}; +} // namespace detail + +// Adaptor functors' member functions definitions. +template +inline +msgpack::object const& +adaptor::convert::operator()(msgpack::object const& o, T& v) const { + v.msgpack_unpack(o.convert()); + return o; +} + +template +template +inline +msgpack::packer& +adaptor::pack::operator()(msgpack::packer& o, T const& v) const { + return msgpack::detail::packer_serializer::pack(o, v); +} + +template +inline +void +adaptor::object_with_zone::operator()(msgpack::object::with_zone& o, T const& v) const { + v.msgpack_object(static_cast(&o), o.zone); +} + +// Adaptor functor specialization to object +namespace adaptor { + +template <> +struct convert { + msgpack::object const& operator()(msgpack::object const& o, msgpack::object& v) const { + v = o; + return o; + } +}; + +template <> +struct pack { + template + msgpack::packer& operator()(msgpack::packer& o, msgpack::object const& v) const { + object_pack_visitor vis(o); + msgpack::object_parser(v).parse(vis); + return o; + } +}; + +template <> +struct object_with_zone { + void operator()(msgpack::object::with_zone& o, msgpack::object const& v) const { + object_with_zone_visitor vis(o); + msgpack::object_parser(v).parse(vis); + } +private: + struct object_with_zone_visitor { + explicit object_with_zone_visitor(msgpack::object::with_zone& owz) + :m_zone(owz.zone), m_ptr(&owz) { + m_objs.push_back(&owz); + } + bool visit_nil() { + m_ptr->type = msgpack::type::NIL; + return true; + } + bool visit_boolean(bool v) { + m_ptr->type = msgpack::type::BOOLEAN; + m_ptr->via.boolean = v; + return true; + } + bool visit_positive_integer(uint64_t v) { + m_ptr->type = msgpack::type::POSITIVE_INTEGER; + m_ptr->via.u64 = v; + return true; + } + bool visit_negative_integer(int64_t v) { + m_ptr->type = msgpack::type::NEGATIVE_INTEGER; + m_ptr->via.i64 = v; + return true; + } + bool visit_float32(float v) { + m_ptr->type = msgpack::type::FLOAT32; + m_ptr->via.f64 = v; + return true; + } + bool visit_float64(double v) { + m_ptr->type = msgpack::type::FLOAT64; + m_ptr->via.f64 = v; + return true; + } + bool visit_str(const char* v, uint32_t size) { + m_ptr->type = msgpack::type::STR; + m_ptr->via.str.size = size; + char* ptr = static_cast(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + m_ptr->via.str.ptr = ptr; + std::memcpy(ptr, v, size); + return true; + } + bool visit_bin(const char* v, uint32_t size) { + m_ptr->type = msgpack::type::BIN; + m_ptr->via.bin.size = size; + char* ptr = static_cast(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + m_ptr->via.bin.ptr = ptr; + std::memcpy(ptr, v, size); + return true; + } + bool visit_ext(const char* v, uint32_t size) { + m_ptr->type = msgpack::type::EXT; + + // v contains type but length(size) doesn't count the type byte. + // See https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family + m_ptr->via.ext.size = size - 1; + + char* ptr = static_cast(m_zone.allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); + m_ptr->via.ext.ptr = ptr; + std::memcpy(ptr, v, size); + return true; + } + bool start_array(uint32_t num_elements) { + m_ptr->type = msgpack::type::ARRAY; + m_ptr->via.array.ptr = static_cast( + m_zone.allocate_align( + sizeof(msgpack::object) * num_elements, MSGPACK_ZONE_ALIGNOF(msgpack::object))); + m_ptr->via.array.size = num_elements; + m_objs.push_back(elem(m_ptr->via.array.ptr)); + return true; + } + bool start_array_item() { + m_ptr = m_objs.back().get_item(); + return true; + } + bool end_array_item() { + ++m_objs.back().as.obj; + return true; + } + bool end_array() { + m_objs.pop_back(); + return true; + } + bool start_map(uint32_t num_kv_pairs) { + m_ptr->type = msgpack::type::MAP; + m_ptr->via.map.ptr = (msgpack::object_kv*)m_zone.allocate_align( + sizeof(msgpack::object_kv) * num_kv_pairs, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv)); + m_ptr->via.map.size = num_kv_pairs; + m_objs.push_back(elem(m_ptr->via.map.ptr)); + return true; + } + bool start_map_key() { + m_ptr = m_objs.back().get_key(); + return true; + } + bool end_map_key() { + return true; + } + bool start_map_value() { + m_ptr = m_objs.back().get_val(); + return true; + } + bool end_map_value() { + ++m_objs.back().as.kv; + return true; + } + bool end_map() { + m_objs.pop_back(); + return true; + } + private: + struct elem { + elem(msgpack::object* obj) + :is_obj(true) { + as.obj = obj; + } + elem(msgpack::object_kv* kv) + :is_obj(false) { + as.kv = kv; + } + msgpack::object* get_item() { + return as.obj; + } + msgpack::object* get_key() { + return &as.kv->key; + } + msgpack::object* get_val() { + return &as.kv->val; + } + union { + msgpack::object* obj; + msgpack::object_kv* kv; + } as; + bool is_obj; + }; + std::vector m_objs; + msgpack::zone& m_zone; + msgpack::object* m_ptr; + }; +}; + +// Adaptor functor specialization to object::with_zone + +template <> +struct object_with_zone { + void operator()( + msgpack::object::with_zone& o, + msgpack::object::with_zone const& v) const { + o << static_cast(v); + } +}; + + +} // namespace adaptor + + +// obsolete +template +class define : public Type { +public: + typedef Type msgpack_type; + typedef define define_type; + define() {} + define(const msgpack_type& v) : msgpack_type(v) {} + + template + void msgpack_pack(Packer& o) const + { + msgpack::operator<<(o, static_cast(*this)); + } + + void msgpack_unpack(object const& o) + { + msgpack::operator>>(o, static_cast(*this)); + } +}; + +// deconvert operator + +template +template +inline msgpack::packer& packer::pack(const T& v) +{ + msgpack::operator<<(*this, v); + return *this; +} + +struct object_equal_visitor { + object_equal_visitor(msgpack::object const& obj, bool& result) + :m_ptr(&obj), m_result(result) {} + bool visit_nil() { + if (m_ptr->type != msgpack::type::NIL) { + m_result = false; + return false; + } + return true; + } + bool visit_boolean(bool v) { + if (m_ptr->type != msgpack::type::BOOLEAN || m_ptr->via.boolean != v) { + m_result = false; + return false; + } + return true; + } + bool visit_positive_integer(uint64_t v) { + if (m_ptr->type != msgpack::type::POSITIVE_INTEGER || m_ptr->via.u64 != v) { + m_result = false; + return false; + } + return true; + } + bool visit_negative_integer(int64_t v) { + if (m_ptr->type != msgpack::type::NEGATIVE_INTEGER || m_ptr->via.i64 != v) { + m_result = false; + return false; + } + return true; + } + bool visit_float32(float v) { + if (m_ptr->type != msgpack::type::FLOAT32 || m_ptr->via.f64 != v) { + m_result = false; + return false; + } + return true; + } + bool visit_float64(double v) { + if (m_ptr->type != msgpack::type::FLOAT64 || m_ptr->via.f64 != v) { + m_result = false; + return false; + } + return true; + } + bool visit_str(const char* v, uint32_t size) { + if (m_ptr->type != msgpack::type::STR || + m_ptr->via.str.size != size || + std::memcmp(m_ptr->via.str.ptr, v, size) != 0) { + m_result = false; + return false; + } + return true; + } + bool visit_bin(const char* v, uint32_t size) { + if (m_ptr->type != msgpack::type::BIN || + m_ptr->via.bin.size != size || + std::memcmp(m_ptr->via.bin.ptr, v, size) != 0) { + m_result = false; + return false; + } + return true; + } + bool visit_ext(const char* v, uint32_t size) { + if (m_ptr->type != msgpack::type::EXT || + m_ptr->via.ext.size != size || + std::memcmp(m_ptr->via.ext.ptr, v, size) != 0) { + m_result = false; + return false; + } + return true; + } + bool start_array(uint32_t num_elements) { + if (m_ptr->type != msgpack::type::ARRAY || + m_ptr->via.array.size != num_elements) { + m_result = false; + return false; + } + m_objs.push_back(elem(m_ptr->via.array.ptr)); + return true; + } + bool start_array_item() { + m_ptr = m_objs.back().get_item(); + return true; + } + bool end_array_item() { + ++m_objs.back().as.obj; + return true; + } + bool end_array() { + m_objs.pop_back(); + return true; + } + bool start_map(uint32_t num_kv_pairs) { + if (m_ptr->type != msgpack::type::MAP || + m_ptr->via.array.size != num_kv_pairs) { + m_result = false; + return false; + } + m_objs.push_back(elem(m_ptr->via.map.ptr)); + return true; + } + bool start_map_key() { + m_ptr = m_objs.back().get_key(); + return true; + } + bool end_map_key() { + return true; + } + bool start_map_value() { + m_ptr = m_objs.back().get_val(); + return true; + } + bool end_map_value() { + ++m_objs.back().as.kv; + return true; + } + bool end_map() { + m_objs.pop_back(); + return true; + } +private: + struct elem { + elem(msgpack::object const* obj) + :is_obj(true) { + as.obj = obj; + } + elem(msgpack::object_kv const* kv) + :is_obj(false) { + as.kv = kv; + } + msgpack::object const* get_item() { + return as.obj; + } + msgpack::object const* get_key() { + return &as.kv->key; + } + msgpack::object const* get_val() { + return &as.kv->val; + } + union { + msgpack::object const* obj; + msgpack::object_kv const* kv; + } as; + bool is_obj; + }; + std::vector m_objs; + msgpack::object const* m_ptr; + bool& m_result; +}; + +inline bool operator==(const msgpack::object& x, const msgpack::object& y) +{ + if(x.type != y.type) { return false; } + bool b = true; + object_equal_visitor vis(y, b); + msgpack::object_parser(x).parse(vis); + return b; +} + +template +inline bool operator==(const msgpack::object& x, const T& y) +try { + return x == msgpack::object(y); +} catch (msgpack::type_error&) { + return false; +} + +inline bool operator!=(const msgpack::object& x, const msgpack::object& y) +{ return !(x == y); } + +template +inline bool operator==(const T& y, const msgpack::object& x) +{ return x == y; } + +template +inline bool operator!=(const msgpack::object& x, const T& y) +{ return !(x == y); } + +template +inline bool operator!=(const T& y, const msgpack::object& x) +{ return x != y; } + + +inline object::implicit_type object::convert() const +{ + return object::implicit_type(*this); +} + +template +inline +typename msgpack::enable_if< + !msgpack::is_array::value && !msgpack::is_pointer::value, + T& +>::type +object::convert(T& v) const +{ + msgpack::operator>>(*this, v); + return v; +} + +template +inline T(&object::convert(T(&v)[N]) const)[N] +{ + msgpack::operator>>(*this, v); + return v; +} + +#if !defined(MSGPACK_DISABLE_LEGACY_CONVERT) +template +inline +typename msgpack::enable_if< + msgpack::is_pointer::value, + T +>::type +object::convert(T v) const +{ + convert(*v); + return v; +} +#endif // !defined(MSGPACK_DISABLE_LEGACY_CONVERT) + +template +inline bool object::convert_if_not_nil(T& v) const +{ + if (is_nil()) { + return false; + } + convert(v); + return true; +} + +#if defined(MSGPACK_USE_CPP03) + +template +inline T object::as() const +{ + T v; + convert(v); + return v; +} + +#else // defined(MSGPACK_USE_CPP03) + +template +inline typename std::enable_if::value, T>::type object::as() const { + return msgpack::adaptor::as()(*this); +} + +template +inline typename std::enable_if::value, T>::type object::as() const { + T v; + convert(v); + return v; +} + +#endif // defined(MSGPACK_USE_CPP03) + +inline object::object() +{ + type = msgpack::type::NIL; +} + +template +inline object::object(const T& v) +{ + *this << v; +} + +template +inline object& object::operator=(const T& v) +{ + *this = object(v); + return *this; +} + +template +inline object::object(const T& v, msgpack::zone& z) +{ + with_zone oz(z); + msgpack::operator<<(oz, v); + type = oz.type; + via = oz.via; +} + +template +inline object::object(const T& v, msgpack::zone* z) +{ + with_zone oz(*z); + msgpack::operator<<(oz, v); + type = oz.type; + via = oz.via; +} + + +inline object::object(const msgpack_object& o) +{ + // FIXME beter way? + std::memcpy(this, &o, sizeof(o)); +} + +inline void operator<< (msgpack::object& o, const msgpack_object& v) +{ + // FIXME beter way? + std::memcpy(static_cast(&o), &v, sizeof(v)); +} + +inline object::operator msgpack_object() const +{ + // FIXME beter way? + msgpack_object obj; + std::memcpy(&obj, this, sizeof(obj)); + return obj; +} + + +// obsolete +template +inline void convert(T& v, msgpack::object const& o) +{ + o.convert(v); +} + +// obsolete +template +inline void pack(msgpack::packer& o, const T& v) +{ + o.pack(v); +} + +// obsolete +template +inline void pack_copy(msgpack::packer& o, T v) +{ + pack(o, v); +} + +template +inline msgpack::packer& operator<< (msgpack::packer& o, const msgpack::object& v) +{ + object_pack_visitor vis(o); + msgpack::object_parser(v).parse(vis); + return o; +} + +template +inline msgpack::packer& operator<< (msgpack::packer& o, const msgpack::object::with_zone& v) +{ + return o << static_cast(v); +} + +inline std::ostream& operator<< (std::ostream& s, const msgpack::object& v) +{ + object_stringize_visitor vis(s); + msgpack::object_parser(v).parse(vis); + return s; +} + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v1) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V1_OBJECT_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/object_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/object_decl.hpp similarity index 96% rename from lib/msgpack-2.1.3/include/msgpack/v1/object_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/object_decl.hpp index 42917bc32c6..7f04a543aa5 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/object_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/object_decl.hpp @@ -83,6 +83,13 @@ bool operator!=(const T& y, const msgpack::object& x); void operator<< (msgpack::object& o, const msgpack_object& v); +class object_parser; + +template +struct object_pack_visitor; + +struct object_stringize_visitor; + // obsolete template MSGPACK_DEPRECATED("please use member function version of object::convert(T&)") @@ -104,7 +111,7 @@ msgpack::packer& operator<< (msgpack::packer& o, const msgpack:: template msgpack::packer& operator<< (msgpack::packer& o, const msgpack::object::with_zone& v); -std::ostream& operator<< (std::ostream& s, const msgpack::object& o); +std::ostream& operator<< (std::ostream& s, const msgpack::object& v); /// @cond } // MSGPACK_API_VERSION_NAMESPACE(v1) diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/object_fwd.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/object_fwd.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v1/object_fwd.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/object_fwd.hpp index 9c98a8f29c0..a932226a3c0 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/object_fwd.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/object_fwd.hpp @@ -59,7 +59,7 @@ struct has_as { decltype(adaptor::as()(std::declval())), T >::type; - template + template static std::false_type check(...); public: using type = decltype(check(MSGPACK_NULLPTR)); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/object_fwd_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/object_fwd_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/object_fwd_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/object_fwd_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/pack.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/pack.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/pack.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/pack.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/pack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/pack_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/pack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/pack_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/parse_return.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/parse_return.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/parse_return.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/parse_return.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/preprocessor.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/preprocessor.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/preprocessor.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/preprocessor.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/sbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/sbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/sbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/sbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/sbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/sbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/sbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/sbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/unpack.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v1/unpack.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/unpack.hpp index 1eb55820498..74836bd3814 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/unpack.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/unpack.hpp @@ -117,7 +117,7 @@ struct unpack_array { if (size / sizeof(msgpack::object) != n) { throw msgpack::array_size_overflow("array size overflow"); } - o.via.array.ptr = static_cast(u.zone().allocate_align(size)); + o.via.array.ptr = static_cast(u.zone().allocate_align(size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); } }; @@ -139,7 +139,7 @@ struct unpack_map { if (size / sizeof(msgpack::object_kv) != n) { throw msgpack::map_size_overflow("map size overflow"); } - o.via.map.ptr = static_cast(u.zone().allocate_align(size)); + o.via.map.ptr = static_cast(u.zone().allocate_align(size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); } }; @@ -164,7 +164,7 @@ inline void unpack_str(unpack_user& u, const char* p, uint32_t l, msgpack::objec } else { if (l > u.limit().str()) throw msgpack::str_size_overflow("str size overflow"); - char* tmp = static_cast(u.zone().allocate_align(l)); + char* tmp = static_cast(u.zone().allocate_align(l, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, p, l); o.via.str.ptr = tmp; } @@ -180,7 +180,7 @@ inline void unpack_bin(unpack_user& u, const char* p, uint32_t l, msgpack::objec } else { if (l > u.limit().bin()) throw msgpack::bin_size_overflow("bin size overflow"); - char* tmp = static_cast(u.zone().allocate_align(l)); + char* tmp = static_cast(u.zone().allocate_align(l, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, p, l); o.via.bin.ptr = tmp; } @@ -196,7 +196,7 @@ inline void unpack_ext(unpack_user& u, const char* p, std::size_t l, msgpack::ob } else { if (l > u.limit().ext()) throw msgpack::ext_size_overflow("ext size overflow"); - char* tmp = static_cast(u.zone().allocate_align(l)); + char* tmp = static_cast(u.zone().allocate_align(l, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, p, l); o.via.ext.ptr = tmp; } @@ -848,7 +848,6 @@ class unpacker { public: /// Constructor /** - * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. * @param f A judging function that msgpack::object refer to the buffer. * @param user_data This parameter is passed to f. * @param initial_buffer_size The memory size to allocate when unpacker is constructed. diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/unpack_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/unpack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/unpack_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/unpack_exception.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/unpack_exception.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/unpack_exception.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/unpack_exception.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/version.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/version.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/version.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/version.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/versioning.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/versioning.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/versioning.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/versioning.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/vrefbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/vrefbuffer.hpp similarity index 95% rename from lib/msgpack-2.1.3/include/msgpack/v1/vrefbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/vrefbuffer.hpp index 6d52a15e606..39bcd69c78d 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v1/vrefbuffer.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v1/vrefbuffer.hpp @@ -58,6 +58,10 @@ class vrefbuffer { :m_ref_size(std::max(ref_size, detail::packer_max_buffer_size + 1)), m_chunk_size(chunk_size) { + if((sizeof(chunk) + chunk_size) < chunk_size) { + throw std::bad_alloc(); + } + size_t nfirst = (sizeof(iovec) < 72/2) ? 72 / sizeof(iovec) : 8; @@ -141,7 +145,11 @@ class vrefbuffer { if(sz < len) { sz = len; } - + + if(sizeof(chunk) + sz < sz){ + throw std::bad_alloc(); + } + chunk* c = static_cast(::malloc(sizeof(chunk) + sz)); if(!c) { throw std::bad_alloc(); @@ -183,6 +191,10 @@ class vrefbuffer { { size_t sz = m_chunk_size; + if((sizeof(chunk) + sz) < sz){ + throw std::bad_alloc(); + } + chunk* empty = static_cast(::malloc(sizeof(chunk) + sz)); if(!empty) { throw std::bad_alloc(); diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/vrefbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/vrefbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/vrefbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/vrefbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/zbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/zbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/zbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/zbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/zbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/zbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/zbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/zbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/zone.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/zone.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/zone.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/zone.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v1/zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v1/zone_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v1/zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v1/zone_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/adaptor_base.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/adaptor_base.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/adaptor_base.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/adaptor_base.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/adaptor_base_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/adaptor_base_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/adaptor_base_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/adaptor_base_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/array_ref_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/array_ref_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/array_ref_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/array_ref_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/check_container_size_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/check_container_size_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/check_container_size_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/check_container_size_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/define_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/define_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/define_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/define_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/ext_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/ext_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/ext_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/ext_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/fixint_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/fixint_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/fixint_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/fixint_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/int_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/int_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/int_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/int_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/map_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/map_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/map_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/msgpack_tuple_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/msgpack_tuple_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/msgpack_tuple_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/nil_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/nil_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/nil_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/nil_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/raw_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/raw_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/size_equal_only_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/size_equal_only_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/size_equal_only_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/size_equal_only_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/adaptor/v4raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/adaptor/v4raw_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/adaptor/v4raw_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/adaptor/v4raw_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/cpp_config_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/cpp_config_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/cpp_config_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/cpp_config_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/create_object_visitor.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor.hpp similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/v2/create_object_visitor.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor.hpp index 8c7cd4b4955..78c47ea8653 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/create_object_visitor.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor.hpp @@ -12,6 +12,7 @@ #include "msgpack/unpack_decl.hpp" #include "msgpack/unpack_exception.hpp" +#include "msgpack/v2/create_object_visitor_decl.hpp" #include "msgpack/v2/null_visitor.hpp" namespace msgpack { @@ -92,9 +93,15 @@ class create_object_visitor : public msgpack::v2::null_visitor { } return true; } - bool visit_float(double v) { + bool visit_float32(float v) { msgpack::object* obj = m_stack.back(); - obj->type = msgpack::type::FLOAT; + obj->type = msgpack::type::FLOAT32; + obj->via.f64 = v; + return true; + } + bool visit_float64(double v) { + msgpack::object* obj = m_stack.back(); + obj->type = msgpack::type::FLOAT64; obj->via.f64 = v; return true; } @@ -107,7 +114,7 @@ class create_object_visitor : public msgpack::v2::null_visitor { set_referenced(true); } else { - char* tmp = static_cast(zone().allocate_align(size)); + char* tmp = static_cast(zone().allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, v, size); obj->via.str.ptr = tmp; } @@ -123,7 +130,7 @@ class create_object_visitor : public msgpack::v2::null_visitor { set_referenced(true); } else { - char* tmp = static_cast(zone().allocate_align(size)); + char* tmp = static_cast(zone().allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, v, size); obj->via.bin.ptr = tmp; } @@ -139,7 +146,7 @@ class create_object_visitor : public msgpack::v2::null_visitor { set_referenced(true); } else { - char* tmp = static_cast(zone().allocate_align(size)); + char* tmp = static_cast(zone().allocate_align(size, MSGPACK_ZONE_ALIGNOF(char))); std::memcpy(tmp, v, size); obj->via.ext.ptr = tmp; } @@ -161,7 +168,7 @@ class create_object_visitor : public msgpack::v2::null_visitor { throw msgpack::array_size_overflow("array size overflow"); } obj->via.array.ptr = - static_cast(m_zone->allocate_align(size)); + static_cast(m_zone->allocate_align(size, MSGPACK_ZONE_ALIGNOF(msgpack::object))); } m_stack.push_back(obj->via.array.ptr); return true; @@ -192,7 +199,7 @@ class create_object_visitor : public msgpack::v2::null_visitor { throw msgpack::map_size_overflow("map size overflow"); } obj->via.map.ptr = - static_cast(m_zone->allocate_align(size)); + static_cast(m_zone->allocate_align(size, MSGPACK_ZONE_ALIGNOF(msgpack::object_kv))); } m_stack.push_back(reinterpret_cast(obj->via.map.ptr)); return true; diff --git a/lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor_decl.hpp new file mode 100644 index 00000000000..c6dc84f85a9 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v2/create_object_visitor_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V2_CREATE_OBJECT_VISITOR_DECL_HPP +#define MSGPACK_V2_CREATE_OBJECT_VISITOR_DECL_HPP + +#include "msgpack/versioning.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v2) { +/// @endcond + +namespace detail { + +class create_object_visitor; + +} // detail + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V2_CREATE_OBJECT_VISITOR_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/detail/cpp03_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/detail/cpp03_zone_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/detail/cpp03_zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/detail/cpp03_zone_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/detail/cpp11_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/detail/cpp11_zone_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/detail/cpp11_zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/detail/cpp11_zone_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/fbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/fbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/fbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/fbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/iterator_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/iterator_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/iterator_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/iterator_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/meta_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/meta_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/meta_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/meta_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/null_visitor.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/null_visitor.hpp similarity index 93% rename from lib/msgpack-2.1.3/include/msgpack/v2/null_visitor.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/null_visitor.hpp index a28702bbf4e..c9a1fdb9aea 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/null_visitor.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/null_visitor.hpp @@ -10,8 +10,7 @@ #ifndef MSGPACK_V2_NULL_VISITOR_HPP #define MSGPACK_V2_NULL_VISITOR_HPP -#include "msgpack/versioning.hpp" -#include "msgpack/cpp_config.hpp" +#include "msgpack/v2/null_visitor_decl.hpp" namespace msgpack { @@ -32,7 +31,10 @@ struct null_visitor { bool visit_negative_integer(int64_t /*v*/) { return true; } - bool visit_float(double /*v*/) { + bool visit_float32(float /*v*/) { + return true; + } + bool visit_float64(double /*v*/) { return true; } bool visit_str(const char* /*v*/, uint32_t /*size*/) { diff --git a/lib/msgpack-3.1.1/include/msgpack/v2/null_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/null_visitor_decl.hpp new file mode 100644 index 00000000000..58c52a01501 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v2/null_visitor_decl.hpp @@ -0,0 +1,29 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V2_NULL_VISITOR_DECL_HPP +#define MSGPACK_V2_NULL_VISITOR_DECL_HPP + +#include "msgpack/versioning.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v2) { +/// @endcond + +struct null_visitor; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V2_NULL_VISITOR_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/object.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/object.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/object.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/object.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/object_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/object_decl.hpp similarity index 90% rename from lib/msgpack-2.1.3/include/msgpack/v2/object_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/object_decl.hpp index bb66a390151..4a357c1c5da 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/object_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/object_decl.hpp @@ -37,6 +37,10 @@ using v1::detail::packer_serializer; } // namespace detail +using v1::object_parser; +using v1::object_pack_visitor; +using v1::object_stringize_visitor; + using v1::operator==; using v1::operator!=; diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/object_fwd.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/object_fwd.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v2/object_fwd.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/object_fwd.hpp index 6928660855c..9c44aae6099 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/object_fwd.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/object_fwd.hpp @@ -91,7 +91,7 @@ struct has_as { v1::has_as::value, std::true_type >::type; - template + template static std::false_type check(...); public: using type = decltype(check(MSGPACK_NULLPTR)); diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/object_fwd_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/object_fwd_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/object_fwd_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/object_fwd_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/pack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/pack_decl.hpp similarity index 99% rename from lib/msgpack-2.1.3/include/msgpack/v2/pack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/pack_decl.hpp index a05091c99c4..8f668dd0a15 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/pack_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/pack_decl.hpp @@ -22,6 +22,7 @@ using v1::packer; using v1::pack; + #if MSGPACK_ENDIAN_LITTLE_BYTE using v1::take8_8; diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/parse.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/parse.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v2/parse.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/parse.hpp index 10312c799c0..becbed45696 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/parse.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/parse.hpp @@ -10,8 +10,14 @@ #ifndef MSGPACK_V2_PARSE_HPP #define MSGPACK_V2_PARSE_HPP +#if MSGPACK_DEFAULT_API_VERSION >= 2 + +#include + +#include "msgpack/unpack_define.h" +#include "msgpack/parse_return.hpp" +#include "msgpack/unpack_exception.hpp" #include "msgpack/unpack_decl.hpp" -#include "msgpack/v2/create_object_visitor.hpp" namespace msgpack { @@ -21,6 +27,10 @@ MSGPACK_API_VERSION_NAMESPACE(v2) { namespace detail { +using v1::detail::fix_tag; +using v1::detail::value; +using v1::detail::load; + template class context { public: @@ -339,7 +349,7 @@ inline parse_return context::execute(const char* data, std::size_ case MSGPACK_CS_FLOAT: { union { uint32_t i; float f; } mem; load(mem.i, n); - bool visret = holder().visitor().visit_float(mem.f); + bool visret = holder().visitor().visit_float32(mem.f); parse_return upr = after_visit_proc(visret, off); if (upr != PARSE_CONTINUE) return upr; } break; @@ -352,7 +362,7 @@ inline parse_return context::execute(const char* data, std::size_ // https://github.com/msgpack/msgpack-perl/pull/1 mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL); #endif - bool visret = holder().visitor().visit_float(mem.f); + bool visret = holder().visitor().visit_float64(mem.f); parse_return upr = after_visit_proc(visret, off); if (upr != PARSE_CONTINUE) return upr; } break; @@ -621,11 +631,11 @@ class parser : public detail::context { public: /// Constructor /** - * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. - * @param f A judging function that msgpack::object refer to the buffer. - * @param user_data This parameter is passed to f. + * @param hook The handler that is called when buffer is allocated internally. + * `hook` should be callable with char* parameter. + * `parser` gives a chance to prepare finalizer. + * See https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#parse-api * @param initial_buffer_size The memory size to allocate when unpacker is constructed. - * @param limit The size limit information of msgpack::object. * */ parser(ReferencedBufferHook& hook, @@ -998,23 +1008,23 @@ inline void parser::remove_nonparsed_buffer template inline bool parse(const char* data, size_t len, size_t& off, Visitor& v) { - parse_return ret = detail::parse_imp(data, len, off, v); + parse_return ret = msgpack::detail::parse_imp(data, len, off, v); return ret == PARSE_SUCCESS || ret == PARSE_EXTRA_BYTES; } template inline bool parse(const char* data, size_t len, Visitor& v) { std::size_t off = 0; - return parse(data, len, off, v); + return msgpack::parse(data, len, off, v); } namespace detail { template -struct parse_helper : context > { +struct parse_helper : detail::context > { parse_helper(Visitor& v):m_visitor(v) {} parse_return execute(const char* data, std::size_t len, std::size_t& off) { - return context >::execute(data, len, off); + return detail::context >::execute(data, len, off); } Visitor& visitor() const { return m_visitor; } Visitor& m_visitor; @@ -1057,5 +1067,6 @@ parse_imp(const char* data, size_t len, size_t& off, Visitor& v) { } // namespace msgpack +#endif // MSGPACK_DEFAULT_API_VERSION >= 2 #endif // MSGPACK_V2_PARSE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v2/parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/parse_decl.hpp new file mode 100644 index 00000000000..c80e71d2be1 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v2/parse_decl.hpp @@ -0,0 +1,79 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V2_PARSE_DECL_HPP +#define MSGPACK_V2_PARSE_DECL_HPP + +#include "msgpack/parse_return.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v2) { +/// @endcond + +namespace detail { + +template +class context; + +} // detail + + +/// Parsing class for a stream deserialization. + +template +class parser; + + +/// Unpack msgpack formatted data via a visitor +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param v The visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept + * + * @return if unpacking process finishes without error then return true, otherwise return false. + * + */ +template +bool parse(const char* data, size_t len, size_t& off, Visitor& v); + + +/// Unpack msgpack formatted data via a visitor +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param v The visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept + * + * @return if unpacking process finishes without error then return true, otherwise return false. + * + */ +template +bool parse(const char* data, size_t len, Visitor& v); + +namespace detail { + +template +struct parse_helper; + +template +inline parse_return +parse_imp(const char* data, size_t len, size_t& off, Visitor& v); + +} // detail + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + + +#endif // MSGPACK_V2_PARSE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/parse_return.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/parse_return.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/parse_return.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/parse_return.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/sbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/sbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/sbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/sbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/unpack.hpp similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/v2/unpack.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/unpack.hpp index c282007985e..993643ab073 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/unpack.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/unpack.hpp @@ -10,9 +10,11 @@ #ifndef MSGPACK_V2_UNPACK_HPP #define MSGPACK_V2_UNPACK_HPP +#if MSGPACK_DEFAULT_API_VERSION >= 2 + #include "msgpack/unpack_decl.hpp" -#include "msgpack/v2/create_object_visitor.hpp" -#include "msgpack/v2/parse.hpp" +#include "msgpack/parse.hpp" +#include "msgpack/create_object_visitor.hpp" namespace msgpack { @@ -20,6 +22,7 @@ namespace msgpack { MSGPACK_API_VERSION_NAMESPACE(v2) { /// @endcond + struct zone_push_finalizer { zone_push_finalizer(msgpack::zone& z):m_z(&z) {} void set_zone(msgpack::zone& z) { m_z = &z; } @@ -228,7 +231,7 @@ inline void unpack( inline void unpack( msgpack::object_handle& result, const char* data, std::size_t len, std::size_t& off, - msgpack::v2::unpack_reference_func f, void* user_data, + unpack_reference_func f, void* user_data, unpack_limit const& limit) { bool referenced; @@ -340,5 +343,6 @@ unpack_imp(const char* data, std::size_t len, std::size_t& off, } // namespace msgpack +#endif // MSGPACK_DEFAULT_API_VERSION >= 2 #endif // MSGPACK_V2_UNPACK_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/unpack_decl.hpp similarity index 89% rename from lib/msgpack-2.1.3/include/msgpack/v2/unpack_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/unpack_decl.hpp index 0e3ceda2699..41312dbaab7 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/unpack_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/unpack_decl.hpp @@ -100,7 +100,7 @@ class basic_unpacker; * @return object_handle that contains unpacked data. * */ -object_handle unpack( +msgpack::object_handle unpack( const char* data, std::size_t len, std::size_t& off, bool& referenced, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -116,7 +116,7 @@ object_handle unpack( * @return object_handle that contains unpacked data. * */ -object_handle unpack( +msgpack::object_handle unpack( const char* data, std::size_t len, std::size_t& off, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -132,7 +132,7 @@ object_handle unpack( * @return object_handle that contains unpacked data. * */ -object_handle unpack( +msgpack::object_handle unpack( const char* data, std::size_t len, bool& referenced, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -147,7 +147,7 @@ object_handle unpack( * @return object_handle that contains unpacked data. * */ -object_handle unpack( +msgpack::object_handle unpack( const char* data, std::size_t len, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -166,7 +166,7 @@ object_handle unpack( * */ void unpack( - object_handle& result, + msgpack::object_handle& result, const char* data, std::size_t len, std::size_t& off, bool& referenced, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -183,7 +183,7 @@ void unpack( * */ void unpack( - object_handle& result, + msgpack::object_handle& result, const char* data, std::size_t len, std::size_t& off, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -200,7 +200,7 @@ void unpack( * */ void unpack( - object_handle& result, + msgpack::object_handle& result, const char* data, std::size_t len, bool& referenced, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -216,7 +216,7 @@ void unpack( * */ void unpack( - object_handle& result, + msgpack::object_handle& result, const char* data, std::size_t len, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); @@ -292,31 +292,6 @@ msgpack::object unpack( const char* data, std::size_t len, unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit()); -/// Unpack msgpack formatted data via a visitor -/** - * @param data The pointer to the buffer. - * @param len The length of the buffer. - * @param off The offset position of the buffer. It is read and overwritten. - * @param v The visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept - * - * @return if unpacking process finishs without error then return true, otherwise return false. - * - */ -template -bool parse(const char* data, size_t len, size_t& off, Visitor& v); - -/// Unpack msgpack formatted data via a visitor -/** - * @param data The pointer to the buffer. - * @param len The length of the buffer. - * @param v The visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept - * - * @return if unpacking process finishs without error then return true, otherwise return false. - * - */ -template -bool parse(const char* data, size_t len, Visitor& v); - namespace detail { parse_return @@ -325,9 +300,6 @@ unpack_imp(const char* data, std::size_t len, std::size_t& off, unpack_reference_func f, void* user_data, unpack_limit const& limit); -template -parse_return -parse_imp(const char* data, size_t len, size_t& off, UnpackVisitor& v); } // detail diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/vrefbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/vrefbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/vrefbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/vrefbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/x3_parse.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/x3_parse.hpp similarity index 98% rename from lib/msgpack-2.1.3/include/msgpack/v2/x3_parse.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/x3_parse.hpp index e824c727bf6..50a0db44c02 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/x3_parse.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/x3_parse.hpp @@ -17,6 +17,7 @@ #if BOOST_VERSION >= 106100 #include "msgpack/versioning.hpp" +#include "msgpack/x3_parse_decl.hpp" #if __GNUC__ >= 4 #pragma GCC diagnostic push @@ -296,9 +297,8 @@ const auto mp_object_def = ( [](auto& ctx){ auto& app_specific = x3::get(ctx).get(); - union { uint32_t i; float f; } mem; - mem.i = _attr(ctx); - app_specific.vis.visit_float(mem.f); + union { uint32_t i; float f; } mem = { _attr(ctx) }; + app_specific.vis.visit_float32(mem.f); } ) ] @@ -308,15 +308,14 @@ const auto mp_object_def = ( [](auto& ctx){ auto& app_specific = x3::get(ctx).get(); - union { uint64_t i; double f; } mem; - mem.i = _attr(ctx); + union { uint64_t i; double f; } mem = { _attr(ctx) }; #if defined(TARGET_OS_IPHONE) // ok #elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi // https://github.com/msgpack/msgpack-perl/pull/1 mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL); #endif - app_specific.vis.visit_float(mem.f); + app_specific.vis.visit_float64(mem.f); } ) ] diff --git a/lib/msgpack-3.1.1/include/msgpack/v2/x3_parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/x3_parse_decl.hpp new file mode 100644 index 00000000000..d146a35363e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v2/x3_parse_decl.hpp @@ -0,0 +1,36 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V2_X3_PARSE_DECL_HPP +#define MSGPACK_V2_X3_PARSE_DECL_HPP + +#if defined(MSGPACK_USE_X3_PARSE) + +#include "msgpack/versioning.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v2) { +/// @endcond + + +template +bool parse(Iterator&& begin, Iterator&& end, Visitor&& vis); + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + + +#endif // defined(MSGPACK_USE_X3_PARSE) + +#endif // MSGPACK_V2_X3_PARSE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/x3_unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack.hpp similarity index 78% rename from lib/msgpack-2.1.3/include/msgpack/v2/x3_unpack.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack.hpp index 16576ac296b..54ca98ea89a 100644 --- a/lib/msgpack-2.1.3/include/msgpack/v2/x3_unpack.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack.hpp @@ -17,8 +17,9 @@ #if BOOST_VERSION >= 106100 #include "msgpack/versioning.hpp" -#include "msgpack/v2/create_object_visitor.hpp" -#include "msgpack/v2/x3_parse.hpp" +#include "msgpack/create_object_visitor.hpp" +#include "msgpack/x3_unpack_decl.hpp" +#include "msgpack/x3_parse.hpp" namespace msgpack { @@ -32,8 +33,8 @@ template inline void unpack_imp(Iterator&& begin, Iterator&& end, msgpack::zone& result_zone, msgpack::object& result, bool& referenced, - unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, - unpack_limit const& limit = unpack_limit()) + unpack_reference_func f, void* user_data, + unpack_limit const& limit) { create_object_visitor v(f, user_data, limit); v.set_zone(result_zone); @@ -53,8 +54,8 @@ template inline msgpack::object_handle unpack( Iterator&& begin, Iterator&& end, bool& referenced, - unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, - unpack_limit const& limit = unpack_limit()) + unpack_reference_func f, void* user_data, + unpack_limit const& limit) { msgpack::object obj; msgpack::unique_ptr z(new msgpack::zone); @@ -67,8 +68,8 @@ inline msgpack::object_handle unpack( template inline msgpack::object_handle unpack( Iterator&& begin, Iterator&& end, - unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, - unpack_limit const& limit = unpack_limit()) + unpack_reference_func f, void* user_data, + unpack_limit const& limit) { bool referenced; return unpack(std::forward(begin), std::forward(end), referenced, f, user_data, limit); @@ -79,8 +80,8 @@ inline msgpack::object unpack( msgpack::zone& z, Iterator&& begin, Iterator&& end, bool& referenced, - unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, - unpack_limit const& limit = unpack_limit()) + unpack_reference_func f, void* user_data, + unpack_limit const& limit) { msgpack::object obj; referenced = false; @@ -93,8 +94,8 @@ template inline msgpack::object unpack( msgpack::zone& z, Iterator&& begin, Iterator&& end, - unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, - unpack_limit const& limit = unpack_limit()) + unpack_reference_func f, void* user_data, + unpack_limit const& limit) { bool referenced; return unpack( diff --git a/lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack_decl.hpp new file mode 100644 index 00000000000..baaf71eb3cd --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v2/x3_unpack_decl.hpp @@ -0,0 +1,71 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V2_X3_UNPACK_DECL_HPP +#define MSGPACK_V2_X3_UNPACK_DECL_HPP + +#if defined(MSGPACK_USE_X3_PARSE) + +#include "msgpack/versioning.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v2) { +/// @endcond + +namespace detail { + +template +void +unpack_imp(Iterator&& begin, Iterator&& end, + msgpack::zone& result_zone, msgpack::object& result, bool& referenced, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +} // namespace detail + +template +msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + + +#endif // defined(MSGPACK_USE_X3_PARSE) + +#endif // MSGPACK_V2_X3_UNPACK_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/zbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/zbuffer_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/zbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/zbuffer_decl.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/v2/zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v2/zone_decl.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/v2/zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/v2/zone_decl.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base.hpp new file mode 100644 index 00000000000..180cca9944c --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base.hpp @@ -0,0 +1,58 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2015-2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_ADAPTOR_BASE_HPP +#define MSGPACK_V3_ADAPTOR_BASE_HPP + +#include "msgpack/v3/adaptor/adaptor_base_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + + +namespace adaptor { + +// Adaptor functors + +template +struct convert : v2::adaptor::convert { +}; + +template +struct pack : v2::adaptor::pack { +}; + +template +struct object< + T, + Enabler, + typename msgpack::enable_if< + !msgpack::is_same::value && + !msgpack::is_array::value + >::type> + : v2::adaptor::object { +}; + +template +struct object_with_zone : v2::adaptor::object_with_zone { +}; + +} // namespace adaptor + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + + +#endif // MSGPACK_V3_ADAPTOR_BASE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base_decl.hpp new file mode 100644 index 00000000000..f339f661e2f --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/adaptor_base_decl.hpp @@ -0,0 +1,52 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_ADAPTOR_BASE_DECL_HPP +#define MSGPACK_V3_ADAPTOR_BASE_DECL_HPP + +#include "msgpack/v2/adaptor/adaptor_base_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::packer; + +namespace adaptor { + +// Adaptor functors + +template +struct convert; + +template +struct pack; + +template +struct object; + +template +struct object_with_zone; + +} // namespace adaptor + +// operators + +using v2::operator>>; +using v2::operator<<; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_ADAPTOR_BASE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/array_ref_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/array_ref_decl.hpp new file mode 100644 index 00000000000..2d5f4124146 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/array_ref_decl.hpp @@ -0,0 +1,36 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_ARRAY_REF_DECL_HPP +#define MSGPACK_V3_TYPE_ARRAY_REF_DECL_HPP + +#include "msgpack/v2/adaptor/array_ref_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::array_ref; + +using v2::type::make_array_ref; + + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_ARRAY_REF_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp new file mode 100644 index 00000000000..e9cf700109c --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp @@ -0,0 +1,42 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP +#define MSGPACK_V3_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP + +#if defined(MSGPACK_USE_BOOST) + +#include "msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::basic_variant; +using v2::type::variant; +using v2::type::variant_ref; + +using v2::type::operator<; + +using v2::type::operator==; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_USE_BOOST +#endif // MSGPACK_V3_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/check_container_size_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/check_container_size_decl.hpp new file mode 100644 index 00000000000..c92050b2b1d --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/check_container_size_decl.hpp @@ -0,0 +1,39 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CHECK_CONTAINER_SIZE_DECL_HPP +#define MSGPACK_V3_CHECK_CONTAINER_SIZE_DECL_HPP + +#include "msgpack/v2/adaptor/check_container_size_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::container_size_overflow; + +namespace detail { + +using v2::detail::check_container_size; + +using v2::detail::check_container_size_for_ext; + +} // namespace detail + +using v2::checked_get_container_size; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CHECK_CONTAINER_SIZE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/define_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/define_decl.hpp new file mode 100644 index 00000000000..da9062f1237 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/define_decl.hpp @@ -0,0 +1,23 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_DEFINE_DECL_HPP +#define MSGPACK_V3_DEFINE_DECL_HPP + +#include "msgpack/cpp_config.hpp" + +#if defined(MSGPACK_USE_CPP03) +#include "msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp" +#include "msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp" +#else // MSGPACK_USE_CPP03 +#include "msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp" +#include "msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp" +#endif // MSGPACK_USE_CPP03 + +#endif // MSGPACK_V3_DEFINE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp new file mode 100644 index 00000000000..5907bfcc66f --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp @@ -0,0 +1,31 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP03_DEFINE_ARRAY_DECL_HPP +#define MSGPACK_V3_CPP03_DEFINE_ARRAY_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp" + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond +namespace type { + +using v2::type::define_array; + +using v2::type::make_define_array; + +} // namespace type +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond +} // namespace msgpack + +#endif // MSGPACK_V3_CPP03_DEFINE_ARRAY_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp new file mode 100644 index 00000000000..b98010ebe4c --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp @@ -0,0 +1,31 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2015-2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP03_DEFINE_MAP_DECL_HPP +#define MSGPACK_V3_CPP03_DEFINE_MAP_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp" + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond +namespace type { + +using v2::type::define_map; + +using v2::type::make_define_map; + +} // namespace type +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond +} // namespace msgpack + +#endif // MSGPACK_V3_CPP03_DEFINE_MAP_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp new file mode 100644 index 00000000000..f81fad9d2d4 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp @@ -0,0 +1,43 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP03_MSGPACK_TUPLE_DECL_HPP +#define MSGPACK_V3_CPP03_MSGPACK_TUPLE_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::tuple; + +using v2::type::tuple_element; + +using v2::type::const_tuple_element; + +using v2::type::tuple_type; + +using v2::type::get; + +using v2::type::make_tuple; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CPP03_MSGPACK_TUPLE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp new file mode 100644 index 00000000000..d6a128b2fc4 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp @@ -0,0 +1,32 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP11_DEFINE_ARRAY_DECL_HPP +#define MSGPACK_V3_CPP11_DEFINE_ARRAY_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp" + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond +namespace type { + +using v2::type::define_array_imp; +using v2::type::define_array; + +using v2::type::make_define_array; + +} // namespace type +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond +} // namespace msgpack + +#endif // MSGPACK_V3_CPP11_DEFINE_ARRAY_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp new file mode 100644 index 00000000000..d14fa9a3e17 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp @@ -0,0 +1,31 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP11_DEFINE_MAP_DECL_HPP +#define MSGPACK_V3_CPP11_DEFINE_MAP_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp" + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond +namespace type { + +using v2::type::define_map_imp; +using v2::type::define_map; +using v2::type::make_define_map; + +} // namespace type +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond +} // namespace msgpack + +#endif // MSGPACK_V3_CPP11_DEFINE_MAP_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp new file mode 100644 index 00000000000..76ab6c7f49a --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp @@ -0,0 +1,59 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP11_MSGPACK_TUPLE_DECL_HPP +#define MSGPACK_V3_CPP11_MSGPACK_TUPLE_DECL_HPP + +#include "msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::get; +using v2::type::tuple_size; +using v2::type::tuple_element; +using v2::type::uses_allocator; +using v2::type::ignore; +using v2::type::swap; + +using v2::type::tuple; + +using v2::type::make_tuple; +using v2::type::forward_as_tuple; +using v2::type::tuple_cat; +using v2::type::tie; + +} // namespace type + +// --- Pack from tuple to packer stream --- + +using v2::MsgpackTuplePacker; + +// --- Convert from tuple to object --- +using v2::MsgpackTupleAs; + +using v2::MsgpackTupleAsImpl; + +using v2::MsgpackTupleConverter; + +// --- Convert from tuple to object with zone --- +using v2::MsgpackTupleToObjectWithZone; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +///@endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CPP11_MSGPACK_TUPLE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/ext_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/ext_decl.hpp new file mode 100644 index 00000000000..6d97f671919 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/ext_decl.hpp @@ -0,0 +1,34 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_EXT_DECL_HPP +#define MSGPACK_V3_TYPE_EXT_DECL_HPP + +#include "msgpack/v2/adaptor/ext_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::ext_ref; +using v2::type::ext; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_EXT_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/fixint_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/fixint_decl.hpp new file mode 100644 index 00000000000..67813e5920e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/fixint_decl.hpp @@ -0,0 +1,43 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_FIXINT_DECL_HPP +#define MSGPACK_V3_TYPE_FIXINT_DECL_HPP + +#include "msgpack/v2/adaptor/fixint_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::fix_int; + +using v2::type::fix_uint8; +using v2::type::fix_uint16; +using v2::type::fix_uint32; +using v2::type::fix_uint64; + +using v2::type::fix_int8; +using v2::type::fix_int16; +using v2::type::fix_int32; +using v2::type::fix_int64; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_FIXINT_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/int_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/int_decl.hpp new file mode 100644 index 00000000000..3a3438ce73b --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/int_decl.hpp @@ -0,0 +1,54 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_INT_DECL_HPP +#define MSGPACK_V3_TYPE_INT_DECL_HPP + +#include "msgpack/v2/adaptor/int_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3){ +/// @endcond + +namespace type { +namespace detail { + + +template +struct convert_integer_sign; + +template +struct is_signed; + + +template +struct object_char_sign; + +//using v2::type::detail::convert_integer_sign; + +//using v2::type::detail::is_signed; + +using v2::type::detail::convert_integer; + +//using v2::type::detail::object_char_sign; + +using v2::type::detail::object_char; + +} // namespace detail +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_INT_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/map_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/map_decl.hpp new file mode 100644 index 00000000000..3be2f3b22a1 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/map_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_MAP_DECL_HPP +#define MSGPACK_V3_TYPE_MAP_DECL_HPP + +#include "msgpack/v2/adaptor/map_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::assoc_vector; + +} //namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_MAP_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp new file mode 100644 index 00000000000..5de62b8d54a --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp @@ -0,0 +1,21 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_MSGPACK_TUPLE_DECL_HPP +#define MSGPACK_V3_MSGPACK_TUPLE_DECL_HPP + +#include "msgpack/cpp_config.hpp" + +#if defined(MSGPACK_USE_CPP03) +#include "msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp" +#else // MSGPACK_USE_CPP03 +#include "msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp" +#endif // MSGPACK_USE_CPP03 + +#endif // MSGPACK_V3_MSGPACK_TUPLE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/nil_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/nil_decl.hpp new file mode 100644 index 00000000000..1948edaeeae --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/nil_decl.hpp @@ -0,0 +1,42 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_NIL_DECL_HPP +#define MSGPACK_V3_TYPE_NIL_DECL_HPP + +#include "msgpack/v2/adaptor/nil_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::nil_t; + +#if defined(MSGPACK_USE_LEGACY_NIL) + +typedef nil_t nil; + +#endif // defined(MSGPACK_USE_LEGACY_NIL) + +using v2::type::operator<; +using v2::type::operator==; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_NIL_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/raw_decl.hpp new file mode 100644 index 00000000000..e0133608b5b --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/raw_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_RAW_DECL_HPP +#define MSGPACK_V3_TYPE_RAW_DECL_HPP + +#include "msgpack/v2/adaptor/raw_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::raw_ref; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_RAW_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/size_equal_only_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/size_equal_only_decl.hpp new file mode 100644 index 00000000000..fb21934f20e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/size_equal_only_decl.hpp @@ -0,0 +1,35 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_SIZE_EQUAL_ONLY_DECL_HPP +#define MSGPACK_V3_TYPE_SIZE_EQUAL_ONLY_DECL_HPP + +#include "msgpack/v2/adaptor/size_equal_only_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::size_equal_only; +using v2::type::make_size_equal_only; +using v2::type::size; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_SIZE_EQUAL_ONLY_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/v4raw_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/v4raw_decl.hpp new file mode 100644 index 00000000000..cc4f841f7d9 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/adaptor/v4raw_decl.hpp @@ -0,0 +1,34 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_TYPE_V4RAW_DECL_HPP +#define MSGPACK_V3_TYPE_V4RAW_DECL_HPP + +#include "msgpack/versioning.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { + +using v2::type::v4raw_ref; + +} // namespace type + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_TYPE_V4RAW_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/cpp_config_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/cpp_config_decl.hpp new file mode 100644 index 00000000000..2a33dc54e33 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/cpp_config_decl.hpp @@ -0,0 +1,84 @@ +// +// MessagePack for C++ C++03/C++11 Adaptation +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP_CONFIG_DECL_HPP +#define MSGPACK_V3_CPP_CONFIG_DECL_HPP + +#include "msgpack/v2/cpp_config_decl.hpp" + +#if defined(MSGPACK_USE_CPP03) + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::unique_ptr; + +using v2::move; + +using v2::enable_if; + +using v2::integral_constant; + +using v2::is_same; + +using v2::underlying_type; + +using v2::is_array; + +using v2::remove_const; +using v2::remove_volatile; +using v2::remove_cv; + +using v2::is_pointer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + + +#else // MSGPACK_USE_CPP03 + +namespace msgpack { +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +// unique_ptr +using v2::unique_ptr; +// using v2::make_unique; // since C++14 +using v2::hash; + +// utility +using v2::move; +using v2::swap; +using v2::enable_if; +using v2::is_same; +using v2::underlying_type; +using v2::is_array; + +using v2::remove_const; +using v2::remove_volatile; +using v2::remove_cv; + +using v2::is_pointer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond +} // namespace msgpack + + +#endif // MSGPACK_USE_CPP03 + +#endif // MSGPACK_V3_CPP_CONFIG_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/create_object_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/create_object_visitor_decl.hpp new file mode 100644 index 00000000000..b3ebb98f72d --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/create_object_visitor_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CREATE_OBJECT_VISITOR_DECL_HPP +#define MSGPACK_V3_CREATE_OBJECT_VISITOR_DECL_HPP + +#include "msgpack/v2/create_object_visitor_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace detail { + +using v2::detail::create_object_visitor; + +} // detail + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CREATE_OBJECT_VISITOR_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp03_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp03_zone_decl.hpp new file mode 100644 index 00000000000..64e91eb3393 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp03_zone_decl.hpp @@ -0,0 +1,31 @@ +// +// MessagePack for C++ memory pool +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP03_ZONE_DECL_HPP +#define MSGPACK_V3_CPP03_ZONE_DECL_HPP + +#include "msgpack/v2/detail/cpp03_zone_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::zone; + +using v2::aligned_size; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CPP03_ZONE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp11_zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp11_zone_decl.hpp new file mode 100644 index 00000000000..f1169d91ec4 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/detail/cpp11_zone_decl.hpp @@ -0,0 +1,31 @@ +// +// MessagePack for C++ memory pool +// +// Copyright (C) 2016 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_CPP11_ZONE_DECL_HPP +#define MSGPACK_V3_CPP11_ZONE_DECL_HPP + +#include "msgpack/v2/zone_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::zone; + +using v2::aligned_size; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_CPP11_ZONE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/fbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/fbuffer_decl.hpp new file mode 100644 index 00000000000..071b0f6a616 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/fbuffer_decl.hpp @@ -0,0 +1,32 @@ +// +// MessagePack for C++ FILE* buffer adaptor +// +// Copyright (C) 2013-2018 Vladimir Volodko and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_FBUFFER_DECL_HPP +#define MSGPACK_V3_FBUFFER_DECL_HPP + +#include "msgpack/v2/fbuffer_decl.hpp" + +#include +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::fbuffer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_FBUFFER_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/iterator_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/iterator_decl.hpp new file mode 100644 index 00000000000..999eb3be954 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/iterator_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_V3_ITERATOR_DECL_HPP +#define MSGPACK_V3_ITERATOR_DECL_HPP +#if !defined(MSGPACK_USE_CPP03) + +#include + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::begin; +using v2::end; + +/// @cond +} +/// @endcond + +} + +#endif // !defined(MSGPACK_USE_CPP03) +#endif // MSGPACK_V3_ITERATOR_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/meta_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/meta_decl.hpp new file mode 100644 index 00000000000..e47db93d080 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/meta_decl.hpp @@ -0,0 +1,50 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2015-2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_V3_META_DECL_HPP +#define MSGPACK_V3_META_DECL_HPP + +#if !defined(MSGPACK_USE_CPP03) + +#include "msgpack/v2/meta_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace detail { + +using v2::detail::bool_pack; + +using v2::detail::all_of_imp; + +using v2::detail::any_of_imp; + +} // namespace detail + +using v2::all_of; + +using v2::any_of; + +using v2::seq; + +using v2::gen_seq; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // !defined(MSGPACK_USE_CPP03) + +#endif // MSGPACK_V3_META_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/null_visitor_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/null_visitor_decl.hpp new file mode 100644 index 00000000000..f4c1fc3c845 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/null_visitor_decl.hpp @@ -0,0 +1,29 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_NULL_VISITOR_DECL_HPP +#define MSGPACK_V3_NULL_VISITOR_DECL_HPP + +#include "msgpack/v2/null_visitor_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::null_visitor; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_NULL_VISITOR_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/object_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/object_decl.hpp new file mode 100644 index 00000000000..12dc41ebe54 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/object_decl.hpp @@ -0,0 +1,53 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_OBJECT_DECL_HPP +#define MSGPACK_V3_OBJECT_DECL_HPP + +#include "msgpack/v2/object_decl.hpp" +#include "msgpack/adaptor/adaptor_base.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::object_handle; + +namespace detail { + +using v2::detail::add_ext_type_size; + +} // namespace detail + +using v2::aligned_zone_size; + +using v2::clone; + +namespace detail { + +using v2::detail::packer_serializer; + +} // namespace detail + +using v2::object_parser; +using v2::object_pack_visitor; +using v2::object_stringize_visitor; + +using v2::operator==; +using v2::operator!=; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_OBJECT_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd.hpp new file mode 100644 index 00000000000..d282f1b4a47 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd.hpp @@ -0,0 +1,70 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_V3_OBJECT_FWD_HPP +#define MSGPACK_V3_OBJECT_FWD_HPP + +#include "msgpack/v3/object_fwd_decl.hpp" +#include "msgpack/object_fwd.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +#if !defined(MSGPACK_USE_CPP03) + +namespace adaptor { + +// If v2 has as specialization for T, then dispatch v2::adaptor::as. +// So I call v2::has_as meta function intentionally. +template +struct as::value>::type> : v2::adaptor::as { +}; + +} // namespace adaptor + +template +struct has_as { +private: + template + static auto check(U*) -> + typename std::enable_if< + // check v3 specialization + std::is_same< + decltype(adaptor::as()(std::declval())), + U + >::value + || + // check v2 specialization + v2::has_as::value + || + // check v1 specialization + v1::has_as::value, + std::true_type + >::type; + template + static std::false_type check(...); +public: + using type = decltype(check(MSGPACK_NULLPTR)); + static constexpr bool value = type::value; +}; + +#endif // !defined(MSGPACK_USE_CPP03) + + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_OBJECT_FWD_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd_decl.hpp new file mode 100644 index 00000000000..9c4ca466cb8 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/object_fwd_decl.hpp @@ -0,0 +1,75 @@ +// +// MessagePack for C++ static resolution routine +// +// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef MSGPACK_V3_OBJECT_FWD_DECL_HPP +#define MSGPACK_V3_OBJECT_FWD_DECL_HPP + +#include "msgpack/v2/object_fwd_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace type { +using v2::type::object_type; +using v2::type::NIL; +using v2::type::BOOLEAN; +using v2::type::POSITIVE_INTEGER; +using v2::type::NEGATIVE_INTEGER; +using v2::type::FLOAT32; +using v2::type::FLOAT64; +using v2::type::FLOAT; +#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT) +using v2::type::DOUBLE; +#endif // MSGPACK_USE_LEGACY_NAME_AS_FLOAT +using v2::type::STR; +using v2::type::BIN; +using v2::type::ARRAY; +using v2::type::MAP; +using v2::type::EXT; +} // namespace type + +using v2::object; + +using v2::object_kv; + +using v2::object_array; +using v2::object_map; + +using v2::object_str; +using v2::object_bin; +using v2::object_ext; + +using v2::type_error; + + +#if !defined(MSGPACK_USE_CPP03) + +namespace adaptor { + +template +struct as; + +} // namespace adaptor + +template +struct has_as; + +#endif // !defined(MSGPACK_USE_CPP03) + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_OBJECT_FWD_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/pack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/pack_decl.hpp new file mode 100644 index 00000000000..c02961748ed --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/pack_decl.hpp @@ -0,0 +1,55 @@ +// +// MessagePack for C++ serializing routine +// +// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_PACK_DECL_HPP +#define MSGPACK_V3_PACK_DECL_HPP + +#include "msgpack/v2/pack_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::packer; + +using v2::pack; + +#if MSGPACK_ENDIAN_LITTLE_BYTE + +using v2::take8_8; + +using v2::take8_16; + +using v2::take8_32; + +using v2::take8_64; + +#elif MSGPACK_ENDIAN_BIG_BYTE + +using v2::take8_8; + +using v2::take8_16; + +using v2::take8_32; + +using v2::take8_64; + +#else +#error msgpack-c supports only big endian and little endian +#endif + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_PACK_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/parse.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/parse.hpp new file mode 100644 index 00000000000..b833f3e3b54 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/parse.hpp @@ -0,0 +1,677 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_PARSE_HPP +#define MSGPACK_V3_PARSE_HPP + +#if MSGPACK_DEFAULT_API_VERSION >= 2 + +#include + +#include "msgpack/parse_return.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace detail { + +template +class context { +public: + context() + :m_trail(0), m_cs(MSGPACK_CS_HEADER) + { + } + + void init() + { + m_cs = MSGPACK_CS_HEADER; + m_trail = 0; + m_stack.clear(); + holder().visitor().init(); + } + + parse_return execute(const char* data, std::size_t len, std::size_t& off); + +private: + template + static uint32_t next_cs(T p) + { + return static_cast(*p) & 0x1f; + } + + VisitorHolder& holder() { + return static_cast(*this); + } + + template + parse_return start_aggregate( + StartVisitor const& sv, + EndVisitor const& ev, + const char* load_pos, + std::size_t& off) { + typename value::type size; + load(size, load_pos); + if (size == 0) { + if (!sv(size)) { + off = m_current - m_start; + return PARSE_STOP_VISITOR; + } + if (!ev()) { + off = m_current - m_start; + return PARSE_STOP_VISITOR; + } + parse_return ret = m_stack.consume(holder(), m_current); + ++m_current; + if (ret != PARSE_CONTINUE) { + off = m_current - m_start; + return ret; + } + } + else { + if (!sv(size)) { + off = m_current - m_start; + return PARSE_STOP_VISITOR; + } + parse_return ret = m_stack.push(holder(), sv.type(), static_cast(size)); + ++m_current; + if (ret != PARSE_CONTINUE) { + off = m_current - m_start; + return ret; + } + } + m_cs = MSGPACK_CS_HEADER; + return PARSE_CONTINUE; + } + + parse_return after_visit_proc(bool visit_result, std::size_t& off) { + if (!visit_result) { + off = m_current - m_start; + return PARSE_STOP_VISITOR; + } + parse_return ret = m_stack.consume(holder(), m_current); + ++m_current; + if (ret != PARSE_CONTINUE) { + off = m_current - m_start; + } + m_cs = MSGPACK_CS_HEADER; + return ret; + } + + struct array_sv { + array_sv(VisitorHolder& visitor_holder):m_visitor_holder(visitor_holder) {} + bool operator()(uint32_t size) const { + return m_visitor_holder.visitor().start_array(size); + } + msgpack_container_type type() const { return MSGPACK_CT_ARRAY_ITEM; } + private: + VisitorHolder& m_visitor_holder; + }; + struct array_ev { + array_ev(VisitorHolder& visitor_holder):m_visitor_holder(visitor_holder) {} + bool operator()() const { + return m_visitor_holder.visitor().end_array(); + } + private: + VisitorHolder& m_visitor_holder; + }; + struct map_sv { + map_sv(VisitorHolder& visitor_holder):m_visitor_holder(visitor_holder) {} + bool operator()(uint32_t size) const { + return m_visitor_holder.visitor().start_map(size); + } + msgpack_container_type type() const { return MSGPACK_CT_MAP_KEY; } + private: + VisitorHolder& m_visitor_holder; + }; + struct map_ev { + map_ev(VisitorHolder& visitor_holder):m_visitor_holder(visitor_holder) {} + bool operator()() const { + return m_visitor_holder.visitor().end_map(); + } + private: + VisitorHolder& m_visitor_holder; + }; + + struct unpack_stack { + struct stack_elem { + stack_elem(msgpack_container_type type, uint32_t rest):m_type(type), m_rest(rest) {} + msgpack_container_type m_type; + uint32_t m_rest; + }; + unpack_stack() { + m_stack.reserve(MSGPACK_EMBED_STACK_SIZE); + } + parse_return push(VisitorHolder& visitor_holder, msgpack_container_type type, uint32_t rest) { + m_stack.push_back(stack_elem(type, rest)); + switch (type) { + case MSGPACK_CT_ARRAY_ITEM: + return visitor_holder.visitor().start_array_item() ? PARSE_CONTINUE : PARSE_STOP_VISITOR; + case MSGPACK_CT_MAP_KEY: + return visitor_holder.visitor().start_map_key() ? PARSE_CONTINUE : PARSE_STOP_VISITOR; + case MSGPACK_CT_MAP_VALUE: + assert(0); + return PARSE_STOP_VISITOR; + } + assert(0); + return PARSE_STOP_VISITOR; + } + parse_return consume(VisitorHolder& visitor_holder, char const*& current) { + while (!m_stack.empty()) { + stack_elem& e = m_stack.back(); + switch (e.m_type) { + case MSGPACK_CT_ARRAY_ITEM: + if (!visitor_holder.visitor().end_array_item()) { + --current; + return PARSE_STOP_VISITOR; + } + if (--e.m_rest == 0) { + m_stack.pop_back(); + if (!visitor_holder.visitor().end_array()) { + --current; + return PARSE_STOP_VISITOR; + } + } + else { + if (!visitor_holder.visitor().start_array_item()) return PARSE_STOP_VISITOR; + return PARSE_CONTINUE; + } + break; + case MSGPACK_CT_MAP_KEY: + if (!visitor_holder.visitor().end_map_key()) { + --current; + return PARSE_STOP_VISITOR; + } + if (!visitor_holder.visitor().start_map_value()) return PARSE_STOP_VISITOR; + e.m_type = MSGPACK_CT_MAP_VALUE; + return PARSE_CONTINUE; + case MSGPACK_CT_MAP_VALUE: + if (!visitor_holder.visitor().end_map_value()) { + --current; + return PARSE_STOP_VISITOR; + } + if (--e.m_rest == 0) { + m_stack.pop_back(); + if (!visitor_holder.visitor().end_map()) { + --current; + return PARSE_STOP_VISITOR; + } + } + else { + e.m_type = MSGPACK_CT_MAP_KEY; + if (!visitor_holder.visitor().start_map_key()) return PARSE_STOP_VISITOR; + return PARSE_CONTINUE; + } + break; + } + } + return PARSE_SUCCESS; + } + bool empty() const { return m_stack.empty(); } + void clear() { m_stack.clear(); } + private: + std::vector m_stack; + }; + + char const* m_start; + char const* m_current; + + std::size_t m_trail; + uint32_t m_cs; + uint32_t m_num_elements; + unpack_stack m_stack; +}; + +template +inline void check_ext_size(std::size_t /*size*/) { +} + +template <> +inline void check_ext_size<4>(std::size_t size) { + if (size == 0xffffffff) throw msgpack::ext_size_overflow("ext size overflow"); +} + +template +inline parse_return context::execute(const char* data, std::size_t len, std::size_t& off) +{ + assert(len >= off); + + m_start = data; + m_current = data + off; + const char* const pe = data + len; + const char* n = MSGPACK_NULLPTR; + + msgpack::object obj; + + if(m_current == pe) { + off = m_current - m_start; + return PARSE_CONTINUE; + } + bool fixed_trail_again = false; + do { + if (m_cs == MSGPACK_CS_HEADER) { + fixed_trail_again = false; + int selector = *reinterpret_cast(m_current); + if (0x00 <= selector && selector <= 0x7f) { // Positive Fixnum + uint8_t tmp = *reinterpret_cast(m_current); + bool visret = holder().visitor().visit_positive_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } else if(0xe0 <= selector && selector <= 0xff) { // Negative Fixnum + int8_t tmp = *reinterpret_cast(m_current); + bool visret = holder().visitor().visit_negative_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } else if (0xc4 <= selector && selector <= 0xdf) { + const uint32_t trail[] = { + 1, // bin 8 0xc4 + 2, // bin 16 0xc5 + 4, // bin 32 0xc6 + 1, // ext 8 0xc7 + 2, // ext 16 0xc8 + 4, // ext 32 0xc9 + 4, // float 32 0xca + 8, // float 64 0xcb + 1, // uint 8 0xcc + 2, // uint 16 0xcd + 4, // uint 32 0xce + 8, // uint 64 0xcf + 1, // int 8 0xd0 + 2, // int 16 0xd1 + 4, // int 32 0xd2 + 8, // int 64 0xd3 + 2, // fixext 1 0xd4 + 3, // fixext 2 0xd5 + 5, // fixext 4 0xd6 + 9, // fixext 8 0xd7 + 17,// fixext 16 0xd8 + 1, // str 8 0xd9 + 2, // str 16 0xda + 4, // str 32 0xdb + 2, // array 16 0xdc + 4, // array 32 0xdd + 2, // map 16 0xde + 4, // map 32 0xdf + }; + m_trail = trail[selector - 0xc4]; + m_cs = next_cs(m_current); + fixed_trail_again = true; + } else if(0xa0 <= selector && selector <= 0xbf) { // FixStr + m_trail = static_cast(*m_current) & 0x1f; + if(m_trail == 0) { + bool visret = holder().visitor().visit_str(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_STR_VALUE; + fixed_trail_again = true; + } + } else if(0x90 <= selector && selector <= 0x9f) { // FixArray + parse_return ret = start_aggregate(array_sv(holder()), array_ev(holder()), m_current, off); + if (ret != PARSE_CONTINUE) return ret; + } else if(0x80 <= selector && selector <= 0x8f) { // FixMap + parse_return ret = start_aggregate(map_sv(holder()), map_ev(holder()), m_current, off); + if (ret != PARSE_CONTINUE) return ret; + } else if(selector == 0xc2) { // false + bool visret = holder().visitor().visit_boolean(false); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } else if(selector == 0xc3) { // true + bool visret = holder().visitor().visit_boolean(true); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } else if(selector == 0xc0) { // nil + bool visret = holder().visitor().visit_nil(); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } else { + off = m_current - m_start; + holder().visitor().parse_error(off - 1, off); + return PARSE_PARSE_ERROR; + } + // end MSGPACK_CS_HEADER + } + if (m_cs != MSGPACK_CS_HEADER || fixed_trail_again) { + if (fixed_trail_again) { + ++m_current; + fixed_trail_again = false; + } + if(static_cast(pe - m_current) < m_trail) { + off = m_current - m_start; + return PARSE_CONTINUE; + } + n = m_current; + m_current += m_trail - 1; + switch(m_cs) { + //case MSGPACK_CS_ + //case MSGPACK_CS_ + case MSGPACK_CS_FLOAT: { + union { uint32_t i; float f; } mem; + load(mem.i, n); + bool visret = holder().visitor().visit_float32(mem.f); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_DOUBLE: { + union { uint64_t i; double f; } mem; + load(mem.i, n); +#if defined(TARGET_OS_IPHONE) + // ok +#elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi + // https://github.com/msgpack/msgpack-perl/pull/1 + mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL); +#endif + bool visret = holder().visitor().visit_float64(mem.f); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_UINT_8: { + uint8_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_positive_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_UINT_16: { + uint16_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_positive_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_UINT_32: { + uint32_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_positive_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_UINT_64: { + uint64_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_positive_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_INT_8: { + int8_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_negative_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_INT_16: { + int16_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_negative_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_INT_32: { + int32_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_negative_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_INT_64: { + int64_t tmp; + load(tmp, n); + bool visret = holder().visitor().visit_negative_integer(tmp); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_FIXEXT_1: { + bool visret = holder().visitor().visit_ext(n, 1+1); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_FIXEXT_2: { + bool visret = holder().visitor().visit_ext(n, 2+1); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_FIXEXT_4: { + bool visret = holder().visitor().visit_ext(n, 4+1); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_FIXEXT_8: { + bool visret = holder().visitor().visit_ext(n, 8+1); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_FIXEXT_16: { + bool visret = holder().visitor().visit_ext(n, 16+1); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_STR_8: { + uint8_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_str(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_STR_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_BIN_8: { + uint8_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_bin(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_BIN_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_EXT_8: { + uint8_t tmp; + load(tmp, n); + m_trail = tmp + 1; + if(m_trail == 0) { + bool visret = holder().visitor().visit_ext(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_EXT_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_STR_16: { + uint16_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_str(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_STR_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_BIN_16: { + uint16_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_bin(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_BIN_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_EXT_16: { + uint16_t tmp; + load(tmp, n); + m_trail = tmp + 1; + if(m_trail == 0) { + bool visret = holder().visitor().visit_ext(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_EXT_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_STR_32: { + uint32_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_str(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_STR_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_BIN_32: { + uint32_t tmp; + load(tmp, n); + m_trail = tmp; + if(m_trail == 0) { + bool visret = holder().visitor().visit_bin(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_BIN_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_CS_EXT_32: { + uint32_t tmp; + load(tmp, n); + check_ext_size(tmp); + m_trail = tmp; + ++m_trail; + if(m_trail == 0) { + bool visret = holder().visitor().visit_ext(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } + else { + m_cs = MSGPACK_ACS_EXT_VALUE; + fixed_trail_again = true; + } + } break; + case MSGPACK_ACS_STR_VALUE: { + bool visret = holder().visitor().visit_str(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_ACS_BIN_VALUE: { + bool visret = holder().visitor().visit_bin(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_ACS_EXT_VALUE: { + bool visret = holder().visitor().visit_ext(n, static_cast(m_trail)); + parse_return upr = after_visit_proc(visret, off); + if (upr != PARSE_CONTINUE) return upr; + } break; + case MSGPACK_CS_ARRAY_16: { + parse_return ret = start_aggregate(array_sv(holder()), array_ev(holder()), n, off); + if (ret != PARSE_CONTINUE) return ret; + + } break; + case MSGPACK_CS_ARRAY_32: { + parse_return ret = start_aggregate(array_sv(holder()), array_ev(holder()), n, off); + if (ret != PARSE_CONTINUE) return ret; + } break; + case MSGPACK_CS_MAP_16: { + parse_return ret = start_aggregate(map_sv(holder()), map_ev(holder()), n, off); + if (ret != PARSE_CONTINUE) return ret; + } break; + case MSGPACK_CS_MAP_32: { + parse_return ret = start_aggregate(map_sv(holder()), map_ev(holder()), n, off); + if (ret != PARSE_CONTINUE) return ret; + } break; + default: + off = m_current - m_start; + holder().visitor().parse_error(n - m_start - 1, n - m_start); + return PARSE_PARSE_ERROR; + } + } + } while(m_current != pe); + + off = m_current - m_start; + return PARSE_CONTINUE; +} + +template +struct parse_helper : detail::context > { + parse_helper(Visitor& v):m_visitor(v) {} + parse_return execute(const char* data, std::size_t len, std::size_t& off) { + return detail::context >::execute(data, len, off); + } + Visitor& visitor() const { return m_visitor; } + Visitor& m_visitor; +}; + +template +inline parse_return +parse_imp(const char* data, size_t len, size_t& off, Visitor& v) { + std::size_t noff = off; + if(len <= noff) { + // FIXME + v.insufficient_bytes(noff, noff); + return PARSE_CONTINUE; + } + detail::parse_helper h(v); + parse_return ret = h.execute(data, len, noff); + off = noff; + switch (ret) { + case PARSE_CONTINUE: + v.insufficient_bytes(noff - 1, noff); + return ret; + case PARSE_SUCCESS: + if(noff < len) { + return PARSE_EXTRA_BYTES; + } + return ret; + default: + return ret; + } +} + +} // detail + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_DEFAULT_API_VERSION >= 2 + +#endif // MSGPACK_V3_PARSE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/parse_decl.hpp new file mode 100644 index 00000000000..f1c2d7adae8 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/parse_decl.hpp @@ -0,0 +1,49 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018-2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_PARSE_DECL_HPP +#define MSGPACK_V3_PARSE_DECL_HPP + +#include "msgpack/v2/parse_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace detail { + +template +class context; + +} // detail + +using v2::parser; +using v2::parse; + +namespace detail { + +template +struct parse_helper; + +template +inline parse_return +parse_imp(const char* data, size_t len, size_t& off, Visitor& v); + +} // detail + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + + +#endif // MSGPACK_V3_PARSE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/parse_return.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/parse_return.hpp new file mode 100644 index 00000000000..0c79c6fa69e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/parse_return.hpp @@ -0,0 +1,35 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_PARSE_RETURN_HPP +#define MSGPACK_V3_PARSE_RETURN_HPP + +#include "msgpack/v2/parse_return.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::parse_return; + +using v2::PARSE_SUCCESS; +using v2::PARSE_EXTRA_BYTES; +using v2::PARSE_CONTINUE; +using v2::PARSE_PARSE_ERROR; +using v2::PARSE_STOP_VISITOR; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_PARSE_RETURN_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/sbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/sbuffer_decl.hpp new file mode 100644 index 00000000000..c713c850fd8 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/sbuffer_decl.hpp @@ -0,0 +1,33 @@ +// +// MessagePack for C++ simple buffer implementation +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_SBUFFER_DECL_HPP +#define MSGPACK_V3_SBUFFER_DECL_HPP + +#include "msgpack/versioning.hpp" + +#ifndef MSGPACK_SBUFFER_INIT_SIZE +#define MSGPACK_SBUFFER_INIT_SIZE 8192 +#endif + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::sbuffer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_SBUFFER_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/unpack.hpp new file mode 100644 index 00000000000..659411b6821 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/unpack.hpp @@ -0,0 +1,192 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_UNPACK_HPP +#define MSGPACK_V3_UNPACK_HPP + +#include "msgpack/unpack_decl.hpp" +#include "msgpack/parse.hpp" +#include "msgpack/create_object_visitor.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +inline msgpack::object_handle unpack( + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit +) +{ + msgpack::object obj; + msgpack::unique_ptr z(new msgpack::zone); + referenced = false; + parse_return ret = detail::unpack_imp( + data, len, off, *z, obj, referenced, f, user_data, limit); + + switch(ret) { + case msgpack::PARSE_SUCCESS: + return msgpack::object_handle(obj, msgpack::move(z)); + case msgpack::PARSE_EXTRA_BYTES: + return msgpack::object_handle(obj, msgpack::move(z)); + default: + break; + } + return msgpack::object_handle(); +} + +inline msgpack::object_handle unpack( + const char* data, std::size_t len, std::size_t& off, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + return msgpack::v3::unpack(data, len, off, referenced, f, user_data, limit); +} + +inline msgpack::object_handle unpack( + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + std::size_t off = 0; + return msgpack::v3::unpack(data, len, off, referenced, f, user_data, limit); +} + +inline msgpack::object_handle unpack( + const char* data, std::size_t len, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + std::size_t off = 0; + return msgpack::v3::unpack(data, len, off, referenced, f, user_data, limit); +} + +inline void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + msgpack::object obj; + msgpack::unique_ptr z(new msgpack::zone); + referenced = false; + parse_return ret = detail::unpack_imp( + data, len, off, *z, obj, referenced, f, user_data, limit); + + switch(ret) { + case msgpack::PARSE_SUCCESS: + result.set(obj); + result.zone() = msgpack::move(z); + return; + case msgpack::PARSE_EXTRA_BYTES: + result.set(obj); + result.zone() = msgpack::move(z); + return; + default: + return; + } +} + +inline void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, std::size_t& off, + msgpack::v3::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + msgpack::v3::unpack(result, data, len, off, referenced, f, user_data, limit); +} + +inline void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + std::size_t off = 0; + msgpack::v3::unpack(result, data, len, off, referenced, f, user_data, limit); +} + +inline void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + std::size_t off = 0; + msgpack::v3::unpack(result, data, len, off, referenced, f, user_data, limit); +} + + +inline msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + msgpack::object obj; + referenced = false; + parse_return ret = detail::unpack_imp( + data, len, off, z, obj, referenced, f, user_data, limit); + + switch(ret) { + case msgpack::PARSE_SUCCESS: + return obj; + case msgpack::PARSE_EXTRA_BYTES: + return obj; + default: + break; + } + return obj; +} + +inline msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, std::size_t& off, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + return msgpack::v3::unpack(z, data, len, off, referenced, f, user_data, limit); +} + +inline msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + std::size_t off = 0; + return msgpack::v3::unpack(z, data, len, off, referenced, f, user_data, limit); +} + +inline msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, + msgpack::unpack_reference_func f, void* user_data, + msgpack::unpack_limit const& limit) +{ + bool referenced; + std::size_t off = 0; + return msgpack::v3::unpack(z, data, len, off, referenced, f, user_data, limit); +} + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + + +#endif // MSGPACK_V3_UNPACK_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/unpack_decl.hpp new file mode 100644 index 00000000000..5ae8831fae1 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/unpack_decl.hpp @@ -0,0 +1,304 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_UNPACK_DECL_HPP +#define MSGPACK_V3_UNPACK_DECL_HPP + +#include "msgpack/v2/unpack_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::unpack_reference_func; + +using v2::unpack_error; +using v2::parse_error; +using v2::insufficient_bytes; +using v2::size_overflow; +using v2::array_size_overflow; +using v2::map_size_overflow; +using v2::str_size_overflow; +using v2::bin_size_overflow; +using v2::ext_size_overflow; +using v2::depth_size_overflow; +using v2::unpack_limit; + +namespace detail { + +using v2::detail::unpack_user; + +using v2::detail::unpack_uint8; +using v2::detail::unpack_uint16; +using v2::detail::unpack_uint32; +using v2::detail::unpack_uint64; + +using v2::detail::unpack_int8; +using v2::detail::unpack_int16; +using v2::detail::unpack_int32; +using v2::detail::unpack_int64; + +using v2::detail::unpack_float; +using v2::detail::unpack_double; + +using v2::detail::unpack_nil; + +using v2::detail::unpack_true; +using v2::detail::unpack_false; + +using v2::detail::unpack_array; +using v2::detail::unpack_array_item; +using v2::detail::unpack_map; +using v2::detail::unpack_map_item; +using v2::detail::unpack_str; +using v2::detail::unpack_bin; +using v2::detail::unpack_ext; + +using v2::detail::unpack_stack; + +using v2::detail::init_count; +using v2::detail::decr_count; +using v2::detail::incr_count; + +using v2::detail::get_count; + +using v2::detail::fix_tag; + +using v2::detail::value; + +using v2::detail::load; + +} // detail + + +using v2::unpacked; +using v2::unpacker; +using v2::basic_unpacker; + +namespace detail { + +using v2::detail::unpack_imp; + +} // detail + +/// Unpack msgpack::object from a buffer. +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return object_handle that contains unpacked data. + * + */ +msgpack::object_handle unpack( + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return object_handle that contains unpacked data. + * + */ +msgpack::object_handle unpack( + const char* data, std::size_t len, std::size_t& off, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return object_handle that contains unpacked data. + * + */ +msgpack::object_handle unpack( + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return object_handle that contains unpacked data. + * + */ +msgpack::object_handle unpack( + const char* data, std::size_t len, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + + +/// Unpack msgpack::object from a buffer. +/** + * @param result The object_handle that contains unpacked data. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * + */ +void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param result The object_handle that contains unpacked data. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * + */ +void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, std::size_t& off, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param result The object_handle that contains unpacked data. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * + */ +void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param result The object_handle that contains unpacked data. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * + */ +void unpack( + msgpack::object_handle& result, + const char* data, std::size_t len, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param z The msgpack::zone that is used as a memory of unpacked msgpack objects. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return msgpack::object that contains unpacked data. + * + */ +msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, std::size_t& off, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param z The msgpack::zone that is used as a memory of unpacked msgpack objects. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param off The offset position of the buffer. It is read and overwritten. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return msgpack::object that contains unpacked data. + * + */ +msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, std::size_t& off, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param z The msgpack::zone that is used as a memory of unpacked msgpack objects. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return msgpack::object that contains unpacked data. + * + */ +msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, bool& referenced, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + +/// Unpack msgpack::object from a buffer. +/** + * @param z The msgpack::zone that is used as a memory of unpacked msgpack objects. + * @param data The pointer to the buffer. + * @param len The length of the buffer. + * @param f A judging function that msgpack::object refer to the buffer. + * @param user_data This parameter is passed to f. + * @param limit The size limit information of msgpack::object. + * + * @return msgpack::object that contains unpacked data. + * + */ +msgpack::object unpack( + msgpack::zone& z, + const char* data, std::size_t len, + msgpack::unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, msgpack::unpack_limit const& limit = unpack_limit()); + + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_UNPACK_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/vrefbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/vrefbuffer_decl.hpp new file mode 100644 index 00000000000..9791904b07a --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/vrefbuffer_decl.hpp @@ -0,0 +1,29 @@ +// +// MessagePack for C++ zero-copy buffer implementation +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_VREFBUFFER_DECL_HPP +#define MSGPACK_V3_VREFBUFFER_DECL_HPP + +#include "msgpack/v2/vrefbuffer_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::vrefbuffer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_VREFBUFFER_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/x3_parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/x3_parse_decl.hpp new file mode 100644 index 00000000000..ded9d25a66e --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/x3_parse_decl.hpp @@ -0,0 +1,34 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_X3_PARSE_DECL_HPP +#define MSGPACK_V3_X3_PARSE_DECL_HPP + +#if defined(MSGPACK_USE_X3_PARSE) + +#include "msgpack/v2/x3_parse_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::parse; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v2) +/// @endcond + +} // namespace msgpack + + +#endif // defined(MSGPACK_USE_X3_PARSE) + +#endif // MSGPACK_V3_X3_PARSE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack.hpp new file mode 100644 index 00000000000..bdadcf169b5 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack.hpp @@ -0,0 +1,97 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_X3_UNPACK_HPP +#define MSGPACK_V3_X3_UNPACK_HPP + +#if defined(MSGPACK_USE_X3_PARSE) + +#include + +#if BOOST_VERSION >= 106100 + +#include "msgpack/versioning.hpp" +#include "msgpack/create_object_visitor.hpp" +#include "msgpack/x3_unpack_decl.hpp" +#include "msgpack/x3_parse.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + + +template +inline msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f, void* user_data, + unpack_limit const& limit) +{ + msgpack::object obj; + msgpack::unique_ptr z(new msgpack::zone); + referenced = false; + detail::unpack_imp( + std::forward(begin), std::forward(end), *z, obj, referenced, f, user_data, limit); + return msgpack::object_handle(obj, msgpack::move(z)); +} + +template +inline msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + unpack_reference_func f, void* user_data, + unpack_limit const& limit) +{ + bool referenced; + return unpack(std::forward(begin), std::forward(end), referenced, f, user_data, limit); +} + +template +inline msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f, void* user_data, + unpack_limit const& limit) +{ + msgpack::object obj; + referenced = false; + detail::unpack_imp( + std::forward(begin), std::forward(end), z, obj, referenced, f, user_data, limit); + return obj; +} + +template +inline msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + unpack_reference_func f, void* user_data, + unpack_limit const& limit) +{ + bool referenced; + return unpack( + z, std::forward(begin), std::forward(end), referenced, f, user_data, limit); +} + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#else // BOOST_VERSION >= 106100 + +#error Boost 1.61.0 or later is required to use x3 parse + +#endif // BOOST_VERSION >= 106100 + +#endif // defined(MSGPACK_USE_X3_PARSE) + +#endif // MSGPACK_V3_X3_UNPACK_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack_decl.hpp new file mode 100644 index 00000000000..b6994476988 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/x3_unpack_decl.hpp @@ -0,0 +1,65 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2017 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_X3_UNPACK_DECL_HPP +#define MSGPACK_V3_X3_UNPACK_DECL_HPP + +#if defined(MSGPACK_USE_X3_PARSE) + +#include "msgpack/v2/x3_unpack_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +namespace detail { + +using v2::detail::unpack_imp; + +} // detail + +template +msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object_handle unpack( + Iterator&& begin, Iterator&& end, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + bool& referenced, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +template +msgpack::object unpack( + msgpack::zone& z, + Iterator&& begin, Iterator&& end, + unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, + unpack_limit const& limit = unpack_limit()); + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // defined(MSGPACK_USE_X3_PARSE) + +#endif // MSGPACK_V3_X3_UNPACK_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/zbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/zbuffer_decl.hpp new file mode 100644 index 00000000000..ef7a8989908 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/zbuffer_decl.hpp @@ -0,0 +1,29 @@ +// +// MessagePack for C++ deflate buffer implementation +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_ZBUFFER_DECL_HPP +#define MSGPACK_V3_ZBUFFER_DECL_HPP + +#include "msgpack/v2/zbuffer_decl.hpp" + +namespace msgpack { + +/// @cond +MSGPACK_API_VERSION_NAMESPACE(v3) { +/// @endcond + +using v2::zbuffer; + +/// @cond +} // MSGPACK_API_VERSION_NAMESPACE(v3) +/// @endcond + +} // namespace msgpack + +#endif // MSGPACK_V3_ZBUFFER_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/v3/zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/v3/zone_decl.hpp new file mode 100644 index 00000000000..ae4f2b279cc --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/v3/zone_decl.hpp @@ -0,0 +1,21 @@ +// +// MessagePack for C++ memory pool +// +// Copyright (C) 2008-2018 FURUHASHI Sadayuki and KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_V3_ZONE_DECL_HPP +#define MSGPACK_V3_ZONE_DECL_HPP + +#include "msgpack/cpp_config.hpp" + +#if defined(MSGPACK_USE_CPP03) +#include "msgpack/v3/detail/cpp03_zone_decl.hpp" +#else // MSGPACK_USE_CPP03 +#include "msgpack/v3/detail/cpp11_zone_decl.hpp" +#endif // MSGPACK_USE_CPP03 + +#endif // MSGPACK_V3_ZONE_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/version.h b/lib/msgpack-3.1.1/include/msgpack/version.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/version.h rename to lib/msgpack-3.1.1/include/msgpack/version.h diff --git a/lib/msgpack-2.1.3/include/msgpack/version.hpp b/lib/msgpack-3.1.1/include/msgpack/version.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/version.hpp rename to lib/msgpack-3.1.1/include/msgpack/version.hpp diff --git a/lib/msgpack-3.1.1/include/msgpack/version_master.h b/lib/msgpack-3.1.1/include/msgpack/version_master.h new file mode 100644 index 00000000000..d145c820e6f --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/version_master.h @@ -0,0 +1,3 @@ +#define MSGPACK_VERSION_MAJOR 3 +#define MSGPACK_VERSION_MINOR 1 +#define MSGPACK_VERSION_REVISION 1 diff --git a/lib/msgpack-2.1.3/include/msgpack/versioning.hpp b/lib/msgpack-3.1.1/include/msgpack/versioning.hpp similarity index 95% rename from lib/msgpack-2.1.3/include/msgpack/versioning.hpp rename to lib/msgpack-3.1.1/include/msgpack/versioning.hpp index a8e6b9688f4..379e715c461 100644 --- a/lib/msgpack-2.1.3/include/msgpack/versioning.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/versioning.hpp @@ -11,7 +11,7 @@ #define MSGPACK_VERSIONING_HPP #if !defined(MSGPACK_DEFAULT_API_VERSION) -#define MSGPACK_DEFAULT_API_VERSION 2 +#define MSGPACK_DEFAULT_API_VERSION 3 #endif #define MSGPACK_DEFAULT_API_NS MSGPACK_DETAIL_PP_CAT(v, MSGPACK_DEFAULT_API_VERSION) @@ -20,6 +20,8 @@ #define MSGPACK_DETAIL_PP_ENABLE_NS_v1 () #elif MSGPACK_DEFAULT_API_VERSION == 2 #define MSGPACK_DETAIL_PP_ENABLE_NS_v2 () +#elif MSGPACK_DEFAULT_API_VERSION == 3 +#define MSGPACK_DETAIL_PP_ENABLE_NS_v3 () #else #error #endif diff --git a/lib/msgpack-2.1.3/include/msgpack/vrefbuffer.h b/lib/msgpack-3.1.1/include/msgpack/vrefbuffer.h similarity index 97% rename from lib/msgpack-2.1.3/include/msgpack/vrefbuffer.h rename to lib/msgpack-3.1.1/include/msgpack/vrefbuffer.h index b4244528987..139869aa6b6 100644 --- a/lib/msgpack-2.1.3/include/msgpack/vrefbuffer.h +++ b/lib/msgpack-3.1.1/include/msgpack/vrefbuffer.h @@ -13,7 +13,7 @@ #include "zone.h" #include -#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__) +#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__QNX__) || defined(__QNXTO__) #include #else struct iovec { @@ -138,4 +138,3 @@ static inline size_t msgpack_vrefbuffer_veclen(const msgpack_vrefbuffer* vref) #endif #endif /* msgpack/vrefbuffer.h */ - diff --git a/lib/msgpack-2.1.3/include/msgpack/vrefbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/vrefbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/vrefbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/vrefbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/vrefbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/vrefbuffer_decl.hpp similarity index 91% rename from lib/msgpack-2.1.3/include/msgpack/vrefbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/vrefbuffer_decl.hpp index 8d7602110c4..1c32d0e6915 100644 --- a/lib/msgpack-2.1.3/include/msgpack/vrefbuffer_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/vrefbuffer_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/vrefbuffer_decl.hpp" #include "msgpack/v2/vrefbuffer_decl.hpp" +#include "msgpack/v3/vrefbuffer_decl.hpp" #endif // MSGPACK_VREFBUFFER_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/x3_parse.hpp b/lib/msgpack-3.1.1/include/msgpack/x3_parse.hpp new file mode 100644 index 00000000000..13ac7501fd2 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/x3_parse.hpp @@ -0,0 +1,15 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_X3_PARSE_HPP +#define MSGPACK_X3_PARSE_HPP + +#include "msgpack/v2/x3_parse.hpp" + +#endif // MSGPACK_X3_PARSE_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/x3_parse_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/x3_parse_decl.hpp new file mode 100644 index 00000000000..9a2258d6ce9 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/x3_parse_decl.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_X3_PARSE_DECL_HPP +#define MSGPACK_X3_PARSE_DECL_HPP + +#include "msgpack/v2/x3_parse_decl.hpp" +#include "msgpack/v3/x3_parse_decl.hpp" + +#endif // MSGPACK_X3_PARSE_DECL_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/x3_unpack.hpp b/lib/msgpack-3.1.1/include/msgpack/x3_unpack.hpp new file mode 100644 index 00000000000..7fa956aebcf --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/x3_unpack.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_X3_UNPACK_HPP +#define MSGPACK_X3_UNPACK_HPP + +#include "msgpack/v2/x3_unpack.hpp" +#include "msgpack/v3/x3_unpack.hpp" + +#endif // MSGPACK_X3_UNPACK_HPP diff --git a/lib/msgpack-3.1.1/include/msgpack/x3_unpack_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/x3_unpack_decl.hpp new file mode 100644 index 00000000000..e67216d9e54 --- /dev/null +++ b/lib/msgpack-3.1.1/include/msgpack/x3_unpack_decl.hpp @@ -0,0 +1,16 @@ +// +// MessagePack for C++ deserializing routine +// +// Copyright (C) 2018 KONDO Takatoshi +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef MSGPACK_X3_UNPACK_DECL_HPP +#define MSGPACK_X3_UNPACK_DECL_HPP + +#include "msgpack/v2/x3_unpack_decl.hpp" +#include "msgpack/v3/x3_unpack_decl.hpp" + +#endif // MSGPACK_X3_UNPACK_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/zbuffer.h b/lib/msgpack-3.1.1/include/msgpack/zbuffer.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/zbuffer.h rename to lib/msgpack-3.1.1/include/msgpack/zbuffer.h diff --git a/lib/msgpack-2.1.3/include/msgpack/zbuffer.hpp b/lib/msgpack-3.1.1/include/msgpack/zbuffer.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/zbuffer.hpp rename to lib/msgpack-3.1.1/include/msgpack/zbuffer.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/zbuffer_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/zbuffer_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/zbuffer_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/zbuffer_decl.hpp index b47220cd91d..1c8495c9c7b 100644 --- a/lib/msgpack-2.1.3/include/msgpack/zbuffer_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/zbuffer_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/zbuffer_decl.hpp" #include "msgpack/v2/zbuffer_decl.hpp" +#include "msgpack/v3/zbuffer_decl.hpp" #endif // MSGPACK_ZBUFFER_DECL_HPP diff --git a/lib/msgpack-2.1.3/include/msgpack/zone.h b/lib/msgpack-3.1.1/include/msgpack/zone.h similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/zone.h rename to lib/msgpack-3.1.1/include/msgpack/zone.h diff --git a/lib/msgpack-2.1.3/include/msgpack/zone.hpp b/lib/msgpack-3.1.1/include/msgpack/zone.hpp similarity index 100% rename from lib/msgpack-2.1.3/include/msgpack/zone.hpp rename to lib/msgpack-3.1.1/include/msgpack/zone.hpp diff --git a/lib/msgpack-2.1.3/include/msgpack/zone_decl.hpp b/lib/msgpack-3.1.1/include/msgpack/zone_decl.hpp similarity index 92% rename from lib/msgpack-2.1.3/include/msgpack/zone_decl.hpp rename to lib/msgpack-3.1.1/include/msgpack/zone_decl.hpp index e8d8b3bc8d6..6adef23d6d3 100644 --- a/lib/msgpack-2.1.3/include/msgpack/zone_decl.hpp +++ b/lib/msgpack-3.1.1/include/msgpack/zone_decl.hpp @@ -12,5 +12,6 @@ #include "msgpack/v1/zone_decl.hpp" #include "msgpack/v2/zone_decl.hpp" +#include "msgpack/v3/zone_decl.hpp" #endif // MSGPACK_ZONE_DECL_HPP diff --git a/lib/msgpack-2.1.3/msgpack-config.cmake.in b/lib/msgpack-3.1.1/msgpack-config.cmake.in similarity index 100% rename from lib/msgpack-2.1.3/msgpack-config.cmake.in rename to lib/msgpack-3.1.1/msgpack-config.cmake.in diff --git a/lib/msgpack-2.1.3/msgpack.pc.in b/lib/msgpack-3.1.1/msgpack.pc.in similarity index 100% rename from lib/msgpack-2.1.3/msgpack.pc.in rename to lib/msgpack-3.1.1/msgpack.pc.in diff --git a/lib/msgpack-2.1.3/msgpack_vc8.sln b/lib/msgpack-3.1.1/msgpack_vc8.sln similarity index 100% rename from lib/msgpack-2.1.3/msgpack_vc8.sln rename to lib/msgpack-3.1.1/msgpack_vc8.sln diff --git a/lib/msgpack-2.1.3/msgpack_vc8.vcproj b/lib/msgpack-3.1.1/msgpack_vc8.vcproj similarity index 100% rename from lib/msgpack-2.1.3/msgpack_vc8.vcproj rename to lib/msgpack-3.1.1/msgpack_vc8.vcproj diff --git a/lib/msgpack-2.1.3/src/objectc.c b/lib/msgpack-3.1.1/src/objectc.c similarity index 100% rename from lib/msgpack-2.1.3/src/objectc.c rename to lib/msgpack-3.1.1/src/objectc.c diff --git a/lib/msgpack-2.1.3/src/unpack.c b/lib/msgpack-3.1.1/src/unpack.c similarity index 98% rename from lib/msgpack-2.1.3/src/unpack.c rename to lib/msgpack-3.1.1/src/unpack.c index e776386462b..e7e2251d787 100644 --- a/lib/msgpack-2.1.3/src/unpack.c +++ b/lib/msgpack-3.1.1/src/unpack.c @@ -537,7 +537,7 @@ static inline msgpack_unpack_return unpacker_next(msgpack_unpacker* mpac, if(ret < 0) { result->zone = NULL; memset(&result->data, 0, sizeof(msgpack_object)); - return ret; + return (msgpack_unpack_return)ret; } if(ret == 0) { @@ -552,7 +552,7 @@ static inline msgpack_unpack_return unpacker_next(msgpack_unpacker* mpac, msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac, msgpack_unpacked* result) { - int ret; + msgpack_unpack_return ret; ret = unpacker_next(mpac, result); if (ret == MSGPACK_UNPACK_SUCCESS) { @@ -566,7 +566,7 @@ msgpack_unpack_return msgpack_unpacker_next_with_size(msgpack_unpacker* mpac, msgpack_unpacked* result, size_t *p_bytes) { - int ret; + msgpack_unpack_return ret; ret = unpacker_next(mpac, result); if (ret == MSGPACK_UNPACK_SUCCESS || ret == MSGPACK_UNPACK_CONTINUE) { @@ -601,7 +601,7 @@ msgpack_unpack(const char* data, size_t len, size_t* off, e = template_execute(&ctx, data, len, &noff); if(e < 0) { - return e; + return (msgpack_unpack_return)e; } if(off != NULL) { *off = noff; } @@ -649,19 +649,19 @@ msgpack_unpack_next(msgpack_unpacked* result, ctx.user.referenced = false; e = template_execute(&ctx, data, len, &noff); + + if(off != NULL) { *off = noff; } + if(e < 0) { msgpack_zone_free(result->zone); result->zone = NULL; - return e; + return (msgpack_unpack_return)e; } - if(e == 0) { return MSGPACK_UNPACK_CONTINUE; } - if(off != NULL) { *off = noff; } - result->data = template_data(&ctx); return MSGPACK_UNPACK_SUCCESS; diff --git a/lib/msgpack-2.1.3/src/version.c b/lib/msgpack-3.1.1/src/version.c similarity index 100% rename from lib/msgpack-2.1.3/src/version.c rename to lib/msgpack-3.1.1/src/version.c diff --git a/lib/msgpack-2.1.3/src/vrefbuffer.c b/lib/msgpack-3.1.1/src/vrefbuffer.c similarity index 94% rename from lib/msgpack-2.1.3/src/vrefbuffer.c rename to lib/msgpack-3.1.1/src/vrefbuffer.c index 28347476400..e03d832bf1a 100644 --- a/lib/msgpack-2.1.3/src/vrefbuffer.c +++ b/lib/msgpack-3.1.1/src/vrefbuffer.c @@ -30,6 +30,10 @@ bool msgpack_vrefbuffer_init(msgpack_vrefbuffer* vbuf, ref_size > MSGPACK_PACKER_MAX_BUFFER_SIZE + 1 ? ref_size : MSGPACK_PACKER_MAX_BUFFER_SIZE + 1 ; + if((sizeof(msgpack_vrefbuffer_chunk) + chunk_size) < chunk_size) { + return false; + } + nfirst = (sizeof(struct iovec) < 72/2) ? 72 / sizeof(struct iovec) : 8; @@ -135,6 +139,9 @@ int msgpack_vrefbuffer_append_copy(msgpack_vrefbuffer* vbuf, sz = len; } + if((sizeof(msgpack_vrefbuffer_chunk) + sz) < sz){ + return -1; + } chunk = (msgpack_vrefbuffer_chunk*)malloc( sizeof(msgpack_vrefbuffer_chunk) + sz); if(chunk == NULL) { @@ -164,8 +171,13 @@ int msgpack_vrefbuffer_append_copy(msgpack_vrefbuffer* vbuf, int msgpack_vrefbuffer_migrate(msgpack_vrefbuffer* vbuf, msgpack_vrefbuffer* to) { size_t sz = vbuf->chunk_size; + msgpack_vrefbuffer_chunk* empty; + + if((sizeof(msgpack_vrefbuffer_chunk) + sz) < sz){ + return -1; + } - msgpack_vrefbuffer_chunk* empty = (msgpack_vrefbuffer_chunk*)malloc( + empty = (msgpack_vrefbuffer_chunk*)malloc( sizeof(msgpack_vrefbuffer_chunk) + sz); if(empty == NULL) { return -1; diff --git a/lib/msgpack-2.1.3/src/zone.c b/lib/msgpack-3.1.1/src/zone.c similarity index 100% rename from lib/msgpack-2.1.3/src/zone.c rename to lib/msgpack-3.1.1/src/zone.c