mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-12 02:36:41 +02:00
operator>> (object, std::vector<T>): return reference; don't copy
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user