diff options
Diffstat (limited to 'cpp/msgpack')
| -rw-r--r-- | cpp/msgpack/pack.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/msgpack/pack.hpp b/cpp/msgpack/pack.hpp index 9c291c1..b7b3ca1 100644 --- a/cpp/msgpack/pack.hpp +++ b/cpp/msgpack/pack.hpp @@ -28,6 +28,7 @@ namespace msgpack { template <typename Stream> class packer { public: + packer(Stream* s); packer(Stream& s); ~packer(); @@ -112,6 +113,12 @@ private: template <typename Stream, typename T> +inline void pack(Stream* s, const T& v) +{ + packer<Stream>(s).pack(v); +} + +template <typename Stream, typename T> inline void pack(Stream& s, const T& v) { packer<Stream>(s).pack(v); @@ -134,6 +141,9 @@ inline void pack(Stream& s, const T& v) template <typename Stream> +packer<Stream>::packer(Stream* s) : m_stream(*s) { } + +template <typename Stream> packer<Stream>::packer(Stream& s) : m_stream(s) { } template <typename Stream> |
