gcc compile errors

This commit is contained in:
Hieu Hoang 2015-11-17 07:54:29 -05:00
parent 10b1f0c7cb
commit 372ef6bfcf
3 changed files with 7 additions and 4 deletions

View File

@ -63,5 +63,5 @@ import path ;
../../../moses//moses
../../../OnDiskPt//OnDiskPt
../../..//boost_filesystem
: <linkflags>$(xmlrpc-linkflags) <cxxflags>$(xmlrpc-cxxflags) ;
: <linkflags>$(xmlrpc-linkflags) <cxxflags>$(xmlrpc-cxxflags) <cxxflags>-std=c++11 ;

View File

@ -10,6 +10,7 @@
#include <vector>
#include <stdint.h>
#include <limits>
class MemPool {
struct Page {
@ -78,6 +79,10 @@ class MemPoolAllocator
public:
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef std::size_t size_type;
size_type max_size() const
@ -95,10 +100,8 @@ public:
return ret;
}
/*
template< class U >
struct rebind { typedef MemPoolAllocator<U> other; };
*/
protected:
MemPool m_pool;

View File

@ -29,7 +29,7 @@ public:
class Stack {
protected:
typedef std::unordered_set<const Hypothesis*, UnorderedComparer<Hypothesis>, UnorderedComparer<Hypothesis>, MemPoolAllocator<const Hypothesis*> > _HCType;
typedef std::unordered_set<const Hypothesis*, UnorderedComparer<Hypothesis>, UnorderedComparer<Hypothesis> > _HCType;
_HCType m_hypos;
public:
typedef _HCType::iterator iterator;