Add support and tests for C++11 minimal allocators

This commit is contained in:
Peter Dimov
2014-02-05 00:17:34 +02:00
parent e8595a05af
commit 90e74511f7
7 changed files with 524 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ public:
::operator delete( p );
}
pointer allocate( size_type n, void const * )
pointer allocate( size_type n, void const * = 0 )
{
T * p = static_cast< T* >( ::operator new( n * sizeof( T ) ) );
@@ -107,7 +107,7 @@ public:
void construct( pointer p, T const & t )
{
new( p ) T( t );
::new( p ) T( t );
}
void destroy( pointer p )