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:
Takatoshi Kondo
2014-08-29 00:43:18 +09:00
parent 2c2df64427
commit 68bf4acb4b
27 changed files with 168 additions and 186 deletions

View File

@@ -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 {