Support MSVC cli.

MSVC CLI defined their own nullptr and provides for __nullptr for standard C++11.
https://msdn.microsoft.com/en-us/library/4ex65770.aspx
msgpack-c introduce MSGPACK_NULLPTR for internal use, it is defined as __nullptr only if compiled on C++ CLI otherwise defined as nullptr.
This commit is contained in:
Takatoshi Kondo
2016-06-08 09:41:18 +09:00
parent ca5ef097ac
commit 0f66e144ab
44 changed files with 186 additions and 176 deletions

View File

@@ -78,7 +78,7 @@ struct object_with_zone<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>
void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>& v) const {
o.type = msgpack::type::ARRAY;
if(v.empty()) {
o.via.array.ptr = nullptr;
o.via.array.ptr = MSGPACK_NULLPTR;
o.via.array.size = 0;
} else {
uint32_t size = checked_get_container_size(v.size());
@@ -132,7 +132,7 @@ struct object_with_zone<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Al
void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>& v) const {
o.type = msgpack::type::ARRAY;
if(v.empty()) {
o.via.array.ptr = nullptr;
o.via.array.ptr = MSGPACK_NULLPTR;
o.via.array.size = 0;
} else {
uint32_t size = checked_get_container_size(v.size());