<br><br><div class="gmail_quote">On Fri, Jul 23, 2010 at 8:19 PM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com" target="_blank">andrei@erdani.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yup, found that and stole all I could from it. The nice thing about scoped() is that it knows exactly the type it needs to destroy (the dynamic type == the static type) so it doesn't need to access the ClassInfo etc. It statically walks up the inheritance tree and destroys everything in sight. Then it destroys that mutex thing.<br>
<br>
Thanks,<br><font color="#888888">
<br>
Andrei</font><div><div></div><div><br></div></div></blockquote><div><br>Looks great. If you replaced that 'emplace' call with direct code to avoid the redundant size and alignment checks, it would be nearly perfect.<br>
</div></div><br>