<div dir="ltr">On Sat, Oct 5, 2013 at 10:21 AM, emmanuel.attia <span dir="ltr"><<a href="mailto:emmanuel.attia@philips.com" target="_blank">emmanuel.attia@philips.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I agree that the 5.3.5 rule is contradictory into what I do, but introduction<br>

of chap 5 states:<br>
<br>
"2. Operators can be overloaded, that is, given meaning when applied to<br>
expressions of class type (clause 9) or enumeration type (7.2). Uses of<br>
overloaded operators are transformed into function calls as described in<br>
13.5. Overloaded operators obey the rules for syntax specified in clause 5,<br>
but the requirements of operand  type, lvalue, and evaluation order are<br>
replaced by the rules for function call."<br>
<br>
So is 5.3.5 really a requirement of any delete operator or only of the<br>
default one ?<br></blockquote><div><br></div><div>13.5/5:</div><div><br></div><div><div>The allocation and deallocation functions, operator new, operator new[], operator delete and operator</div><div>delete[], are described completely in 3.7.4. The attributes and restrictions found in the rest of this</div>
<div>subclause do not apply to them unless explicitly stated in 3.7.4.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

For the default delete operator since the behavior is to free the memory it<br>
would make sense to require the destructor of the object to be callable by<br>
putting a virtual destructor in the base interface.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/is-delete-on-abstract-with-non-virtal-ever-safe-tp4025653p4034904.html" target="_blank">http://clang-developers.42468.n3.nabble.com/is-delete-on-abstract-with-non-virtal-ever-safe-tp4025653p4034904.html</a><br>

<div class=""><div class="h5">Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>