mosesdecoder/contrib/other-builds/moses2/Vector.h
2016-01-18 15:37:04 +00:00

31 lines
429 B
C++

/*
* Vector.h
*
* Created on: 7 Dec 2015
* Author: hieu
*/
#pragma once
#include <cassert>
#include "MemPool.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) )
{
}
protected:
};
}