mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-22 08:02:08 +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:
@@ -38,12 +38,12 @@
|
||||
#define MSGPACK_ADD_ENUM(enum) \
|
||||
namespace msgpack { \
|
||||
template <> \
|
||||
inline enum& operator>> (object const& o, enum& v) \
|
||||
inline object const& operator>> (object const& o, enum& v) \
|
||||
{ \
|
||||
int tmp; \
|
||||
o >> tmp; \
|
||||
v = static_cast<enum>(tmp); \
|
||||
return v; \
|
||||
return o; \
|
||||
} \
|
||||
template <> \
|
||||
inline void operator<< (object::with_zone& o, const enum& v) \
|
||||
@@ -145,4 +145,3 @@ define<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_define(A0& a0<%1.upto(i) {|j|%>,
|
||||
|
||||
|
||||
#endif // MSGPACK_CPP03_DEFINE_HPP
|
||||
|
||||
|
Reference in New Issue
Block a user