VC11 fails to build angle because oppl_allocator::operator= does not exist

ANGLEBUG=229 Signed-off-by: Nicolas Capens Author: Ehsan Akhgari git-svn-id: https://angleproject.googlecode.com/svn/trunk@798 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent a9ae4aa9
...@@ -41,3 +41,5 @@ ddefrostt ...@@ -41,3 +41,5 @@ ddefrostt
timeless timeless
Yore Apex Yore Apex
Mark Callow Mark Callow
Ehsan Akhgari
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 797 #define BUILD_REVISION 798
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -253,12 +253,18 @@ public: ...@@ -253,12 +253,18 @@ public:
pointer address(reference x) const { return &x; } pointer address(reference x) const { return &x; }
const_pointer address(const_reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; }
pool_allocator() : allocator(GlobalPoolAllocator) { } pool_allocator() : allocator(&GlobalPoolAllocator) { }
pool_allocator(TPoolAllocator& a) : allocator(a) { } pool_allocator(TPoolAllocator& a) : allocator(&a) { }
pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { } pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { }
template <class Other>
pool_allocator<T>& operator=(const pool_allocator<Other>& p) {
allocator = p.allocator;
return *this;
}
template<class Other> template<class Other>
pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { } pool_allocator(const pool_allocator<Other>& p) : allocator(&p.getAllocator()) { }
#if defined(__SUNPRO_CC) && !defined(_RWSTD_ALLOCATOR) #if defined(__SUNPRO_CC) && !defined(_RWSTD_ALLOCATOR)
// libCStd on some platforms have a different allocate/deallocate interface. // libCStd on some platforms have a different allocate/deallocate interface.
...@@ -290,11 +296,11 @@ public: ...@@ -290,11 +296,11 @@ public:
size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); } size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
size_type max_size(int size) const { return static_cast<size_type>(-1) / size; } size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
void setAllocator(TPoolAllocator* a) { allocator = *a; } void setAllocator(TPoolAllocator* a) { allocator = a; }
TPoolAllocator& getAllocator() const { return allocator; } TPoolAllocator& getAllocator() const { return *allocator; }
protected: protected:
TPoolAllocator& allocator; TPoolAllocator* allocator;
}; };
#endif // _POOLALLOC_INCLUDED_ #endif // _POOLALLOC_INCLUDED_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment