mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 15:16:51 +02:00
Fixed #399
If MSGPACK_DISABLE_LEGACY_CONVERT is defined, msgpack::object::convert(T*) is removed. Added MSGPACK_DISABLE_LEGACY_CONVERT to build system and documents. Please define MSGPACK_DISABLE_LEGACY_CONVERT and update your code as follows: Replace int i; obj.convert(&i); // Removed pointer version with int i; obj.convert(i); // Reference version
This commit is contained in:
@@ -523,12 +523,14 @@ inline T& object::convert(T& v) const
|
||||
return v;
|
||||
}
|
||||
|
||||
#if !defined(MSGPACK_DISABLE_LEGACY_CONVERT)
|
||||
template <typename T>
|
||||
inline T* object::convert(T* v) const
|
||||
{
|
||||
convert(*v);
|
||||
return v;
|
||||
}
|
||||
#endif // !defined(MSGPACK_DISABLE_LEGACY_CONVERT)
|
||||
|
||||
template <typename T>
|
||||
inline bool object::convert_if_not_nil(T& v) const
|
||||
|
Reference in New Issue
Block a user