<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 6:27 AM, François Fayard <span dir="ltr"><<a href="mailto:fayard.francois@icloud.com" target="_blank">fayard.francois@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><blockquote type="cite"></blockquote>Hi,<br><blockquote type="cite"></blockquote><font color="#5856d6"><br></font><blockquote type="cite"></blockquote>I have checked and N3664 only talks about new/delete but not about operator<br>new/delete. Do you know the rationale behind this choice?</div></blockquote><div><br>I believe the notion was to provide a syntax for /actually/ calling those functions that the compiler couldn't optimize away, in case you wanted them for their side effects, etc.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><br><div><blockquote type="cite"><div><blockquote type="cite"></blockquote>On 04 May 2015, at 13:45, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com" target="_blank">benny.kra@gmail.com</a>> wrote:<br><blockquote type="cite"></blockquote><font color="#00afcd"><br></font><blockquote type="cite"></blockquote>Sadly this is a feature. The C++ standard has been unclear<br><blockquote type="cite"></blockquote>historically about whether removing pairs of new/delete. The problem<br><blockquote type="cite"></blockquote>is that the user may override them so this is an observable change,<br><blockquote type="cite"></blockquote>but some compilers (LLVM) removed them anyways. As you said C++14<br><blockquote type="cite"></blockquote>changed the wording so removing new/delete expression pairs is now<br><blockquote type="cite"></blockquote>explicitly legal. Calls to ::operator new and delete aren't new/delete<br><blockquote type="cite"></blockquote>expressions though, so it should behave as expected when overridden.<br><blockquote type="cite"></blockquote><font color="#00afcd"><br></font><blockquote type="cite"></blockquote>It looks like a glitch in the standard, but if I remember correctly it<br><blockquote type="cite"></blockquote>was done intentionally.<br><blockquote type="cite"></blockquote><font color="#00afcd"><br></font>- Ben<br></div></blockquote></div><br></div></span></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>