1
0
mirror of https://github.com/msgpack/msgpack-c.git synced 2025-04-27 18:30:53 +02:00

operator>> (object, std::vector<T>): return reference; don't copy

This commit is contained in:
frsyuki 2009-08-06 13:26:34 +09:00
parent aaef612a05
commit f7a9805f7b

@ -25,7 +25,7 @@ namespace msgpack {
template <typename T>
inline std::vector<T> operator>> (object o, std::vector<T>& v)
inline std::vector<T>& operator>> (object o, std::vector<T>& v)
{
if(o.type != type::ARRAY) { throw type_error(); }
v.resize(o.via.array.size);