I've just noticed that the pointers passed to delete can be const qualified while those passed to free cannot. That is really a surprise to me.
And in C++ an overload to operator delete should have a signature like:
void operator delete(void* p);
But adding a const to the parameter pointer is invalid:
void operator delete(void const* p);
May anyone tell me why delete is designed this way?