lang/c/msgpack: C++ binding: pack()

git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@73 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
frsyuki
2009-02-15 09:09:58 +00:00
parent 2c7f0b2b1a
commit 921b0ff62e
8 changed files with 38 additions and 47 deletions

View File

@@ -22,12 +22,11 @@
#include <vector>
namespace msgpack {
namespace type {
inline bool& operator>> (object o, bool& v)
{
if(o.type != BOOLEAN) { throw type_error(); }
if(o.type != type::BOOLEAN) { throw type_error(); }
v = o.via.boolean;
return v;
}
@@ -42,7 +41,6 @@ inline packer<Stream>& operator<< (packer<Stream>& o, const bool& v)
}
} // namespace type
} // namespace msgpack
#endif /* msgpack/type/bool.hpp */