mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-25 22:44:05 +02:00
Merge pull request #238 from redboltz/move_serialize_operator
Moved serialize operator.
This commit is contained in:
commit
037a108c49
@ -196,13 +196,6 @@ struct packer_serializer {
|
||||
};
|
||||
}
|
||||
|
||||
// serialize operator
|
||||
template <typename Stream, typename T>
|
||||
inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const T& v)
|
||||
{
|
||||
return detail::packer_serializer<Stream, T>::pack(o, v);
|
||||
}
|
||||
|
||||
inline void operator<< (msgpack::object::with_zone& o, const msgpack::object& v)
|
||||
{
|
||||
o.type = v.type;
|
||||
|
@ -139,6 +139,15 @@ inline void pack(Stream& s, const T& v)
|
||||
packer<Stream>(s).pack(v);
|
||||
}
|
||||
|
||||
// serialize operator
|
||||
template <typename Stream, typename T>
|
||||
inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const T& v)
|
||||
{
|
||||
return detail::packer_serializer<Stream, T>::pack(o, v);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
template <typename T>
|
||||
inline char take8_8(T d) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user