Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Vector.h « moses2 « contrib - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f35e7182536913bb920314b6118bf673a87151a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Vector.h
 *
 *  Created on: 7 Dec 2015
 *      Author: hieu
 */

#pragma once
#include <cassert>
#include "MemPoolAllocator.h"

namespace Moses2
{

template<typename T>
class Vector: public std::vector<T, MemPoolAllocator<T> >
{
  typedef std::vector<T, MemPoolAllocator<T> > Parent;

public:
  Vector(MemPool &pool, size_t size = 0, const T &val = T()) :
      Parent(size, val, MemPoolAllocator<T>(pool))
  {
  }

  Vector(const Vector &copy) :
      Parent(copy)
  {
  }

protected:
};


}