mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 15:16:51 +02:00
Fixed operator>>(object const& o, various types& v) return type and value problem.
https://github.com/msgpack/msgpack-c/issues/105
This commit is contained in:
@@ -188,18 +188,18 @@ inline packer<Stream>& packer<Stream>::pack(const T& v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline object& operator>> (object const& o, object& v)
|
||||
inline object const& operator>> (object const& o, object& v)
|
||||
{
|
||||
v = o;
|
||||
return v;
|
||||
return o;
|
||||
}
|
||||
|
||||
// convert operator
|
||||
template <typename T>
|
||||
inline T& operator>> (object const& o, T& v)
|
||||
inline object const& operator>> (object const& o, T& v)
|
||||
{
|
||||
v.msgpack_unpack(o.convert());
|
||||
return v;
|
||||
return o;
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
Reference in New Issue
Block a user