<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On 6 August 2013 17:54, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<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"><div class="im"><br></div>
What's the destructor look like for "`A arr[2]`"? I believe that should already be handled, even if it's just a very early special case to bail out. If so, you should be able to do something similar for temporary destructors.<br>
</blockquote><div>Ok, it seems I still get an (implicit) array destructor even if I declare the array as 'const A x[2] = { A(), A() };', so I guess it must be handled somehow. I'll try to find the logic and emulate it for temporary destructors.</div>
<div>However, there is one more detail:</div><div>in the implicit case, the array is destroyed *after* the members of the array. However, in the original initializer_list case, the array is actually destroyed before the elements. Does this matter? Should I also change the destructor order in the CFG while I'm digging through there?</div>
<div><br></div><div>thanks,</div><div>pl</div></div></div></div>