C* p = static_cast< C* >( operator new( 10 * sizeof( C ) ) ); for( int i = 0; i < 10; ++ i ) new( p[ i ] ) C( ... ); ... for( int i = 0; i < 10; ++ i ) p[ i ].~C(); operator delete( p );
と、
C* p = static_cast< C* >( operator new[]( 10 * sizeof( C ) ) ); for( int i = 0; i < 10; ++ i ) new( p[ i ] ) C( ... ); ... for( int i = 0; i < 10; ++ i ) p[ i ].~C(); operator delete[]( p );