Hi Toon,
The deallocate function MUST NOT by passed in a NULL pointer. (According to ISO 14882.)
You can fix your code by...
#include <memory> int main() { std::allocator< int > int_alloc ; int* p = int_alloc.allocate( 0 ) ; if(p) int_alloc.deallocate( p, 0 ) ; return 0 ; }
HTH, --Eljay