aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/objects/deserializer.hpp
blob: cf9bd5b0a48c15b0d5de3aadf1b5bac645f5f2a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "deserializer.h"

namespace vespalib {

template <typename T>
Deserializer &
Deserializer::operator >> (std::vector<T> & v) {
    uint32_t sz;
    get(sz);
    v.resize(sz);
    for(size_t i(0); i < sz; i++) {
        (*this) >> v[i];
    }
    return *this;
}

}