c++: fix object >> std::string

This commit is contained in:
frsyuki 2009-08-10 22:16:44 +09:00
parent a62a5d6c69
commit 92952f6566
4 changed files with 3 additions and 6 deletions

View file

@ -31,7 +31,6 @@ inline bool& operator>> (object o, bool& v)
return v;
}
template <typename Stream>
inline packer<Stream>& operator<< (packer<Stream>& o, const bool& v)
{

View file

@ -37,7 +37,6 @@ inline std::set<T>& operator>> (object o, std::set<T>& v)
return v;
}
template <typename Stream, typename T>
inline packer<Stream>& operator<< (packer<Stream>& o, const std::set<T>& v)
{

View file

@ -26,9 +26,8 @@ namespace msgpack {
inline std::string& operator>> (object o, std::string& v)
{
type::raw_ref r;
o >> r;
v.assign(r.ptr, r.size);
if(o.type != type::RAW) { throw type_error(); }
v.assign(o.via.raw.ptr, o.via.raw.size);
return v;
}