On Wed, 2017-08-16 at 13:30 +0200, Paolo Carlini wrote: > > I didn't understand why we don't already handle the easy case: > > constexpr int* ptr = nullptr; > delete ptr; >
What about overriding the global delete operator with some user defined implementation? Is there something in the C++ standard that says the invocation can be completely omitted, i.e. on which side of the call the nullptr check is being done? One possible use case could be overriding the global delete operator to count the number of invocations, incl. for nullptr. Not sure how useful that is though. Cheers, Oleg
