diff options
Diffstat (limited to 'gcc-4.9/libstdc++-v3/include/ext/new_allocator.h')
-rw-r--r-- | gcc-4.9/libstdc++-v3/include/ext/new_allocator.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc-4.9/libstdc++-v3/include/ext/new_allocator.h b/gcc-4.9/libstdc++-v3/include/ext/new_allocator.h index 996a2195e..ee9333e1f 100644 --- a/gcc-4.9/libstdc++-v3/include/ext/new_allocator.h +++ b/gcc-4.9/libstdc++-v3/include/ext/new_allocator.h @@ -104,10 +104,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } +#ifdef __GXX_DELETE_WITH_SIZE__ + // __p is not permitted to be a null pointer. + void + deallocate(pointer __p, size_type __t) + { ::operator delete(__p, __t * sizeof(_Tp)); } +#else // __p is not permitted to be a null pointer. void deallocate(pointer __p, size_type) { ::operator delete(__p); } +#endif size_type max_size() const _GLIBCXX_USE_NOEXCEPT |