mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 21:18:23 +01:00
c++: fix object >> std::string
This commit is contained in:
parent
a62a5d6c69
commit
92952f6566
@ -1,6 +1,6 @@
|
|||||||
AC_INIT(msgpack/unpack_template.h)
|
AC_INIT(msgpack/unpack_template.h)
|
||||||
AC_CONFIG_AUX_DIR(ac)
|
AC_CONFIG_AUX_DIR(ac)
|
||||||
AM_INIT_AUTOMAKE(msgpack, 0.3.5)
|
AM_INIT_AUTOMAKE(msgpack, 0.3.6)
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
@ -31,7 +31,6 @@ inline bool& operator>> (object o, bool& v)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
inline packer<Stream>& operator<< (packer<Stream>& o, const bool& v)
|
inline packer<Stream>& operator<< (packer<Stream>& o, const bool& v)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@ inline std::set<T>& operator>> (object o, std::set<T>& v)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename Stream, typename T>
|
template <typename Stream, typename T>
|
||||||
inline packer<Stream>& operator<< (packer<Stream>& o, const std::set<T>& v)
|
inline packer<Stream>& operator<< (packer<Stream>& o, const std::set<T>& v)
|
||||||
{
|
{
|
||||||
|
@ -26,9 +26,8 @@ namespace msgpack {
|
|||||||
|
|
||||||
inline std::string& operator>> (object o, std::string& v)
|
inline std::string& operator>> (object o, std::string& v)
|
||||||
{
|
{
|
||||||
type::raw_ref r;
|
if(o.type != type::RAW) { throw type_error(); }
|
||||||
o >> r;
|
v.assign(o.via.raw.ptr, o.via.raw.size);
|
||||||
v.assign(r.ptr, r.size);
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user