Merge pull request #238 from redboltz/move_serialize_operator

Moved serialize operator.
This commit is contained in:
Nobuyuki Kubota 2015-03-10 21:14:24 +09:00
commit 037a108c49
2 changed files with 9 additions and 7 deletions

View File

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

View File

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