Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I remember something similar on operator delete a while ago in comp.lang.c++.moderated. I cannot find it now, but the answer stated something like this ..</p> <blockquote> <p>Unfortunately, the language specification is not sufficiently clear on whether the control should go into the overloaded 'operator delete' when the delete-expression is invoked on the null-pointer of corresponding type, even though the standard does say that delete-expression on null-pointer is a no-op.</p> </blockquote> <p>And <em>James Kanze</em> specifically said:</p> <blockquote> <p>It's still the responisiblity of operator delete (or delete[]) to check; the standard doesn't guarantee that it won't be given a null pointer; the standard requires that it be a no-op if given a null pointer. Or that the implementation is allowed to call it. According to the latest draft, "The value of the first argument supplied to a deallocation function may be a null pointer value; if so, and if the deallocation function is one supplied in the standard library, the call has no effect." I'm not quite sure what the implications of that "is one supplied in the standard library" are meant to be---taken literally, since his function is not one provided by the standard library, the sentence wouldn't seem to apply. But somehow, that doesn't make sense</p> </blockquote> <p>I remember this becoz i had a similar prob sometime back and had preserved the answer in a .txt file.</p> <p><strong>UPDATE-1:</strong></p> <p>Oh i found it <a href="http://bytes.com/groups/cpp/853692-null-pointer-overloaded-operator-delete" rel="noreferrer">here</a>. Also read this link <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#348" rel="noreferrer">defect report</a>. So, the answer is <strong><em>Unspecified</em></strong>. Chapter <strong><em>5.3.5/7</em></strong>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload