mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-23 00:08:01 +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:
@@ -24,11 +24,11 @@
|
||||
namespace msgpack {
|
||||
|
||||
|
||||
inline bool& operator>> (object const& o, bool& v)
|
||||
inline object const& operator>> (object const& o, bool& v)
|
||||
{
|
||||
if(o.type != type::BOOLEAN) { throw type_error(); }
|
||||
v = o.via.boolean;
|
||||
return v;
|
||||
return o;
|
||||
}
|
||||
|
||||
template <typename Stream>
|
||||
@@ -52,4 +52,3 @@ inline void operator<< (object::with_zone& o, bool v)
|
||||
} // namespace msgpack
|
||||
|
||||
#endif /* msgpack/type/bool.hpp */
|
||||
|
||||
|
Reference in New Issue
Block a user