mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
operator>> (object, std::vector<T>): return reference; don't copy
This commit is contained in:
parent
aaef612a05
commit
f7a9805f7b
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue