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

View File

@ -29,7 +29,7 @@ public:
class Stack { class Stack {
protected: 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; _HCType m_hypos;
public: public:
typedef _HCType::iterator iterator; typedef _HCType::iterator iterator;