<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 20, 2013 at 11:23 AM, 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 style="word-wrap:break-word"><div class="im"><br><div>
<div>On Feb 19, 2013, at 18:20 , David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Tue, Feb 19, 2013 at 6:15 PM, 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">This is awesome. I think you need to write a move constructor now too, though—otherwise you'll end up with two complete objects being destructed. (Consider Optional<std::string>.)<br>

</blockquote><div><br></div><div>I don't think I /need/ to write a move ctor, in the sense that the type won't get one for free (the conditions under which an implicit move ctor is provided are vanishingly rare) but it'd certainly be nice to have one.</div>

</div></div></div></blockquote><br></div></div><div>Ah, whoops, forgot about the "no user-declared copy-constructors" requirement. Downgrade this to a Nice to Have, then. :-)</div></div></blockquote><div><br></div>
<div>Implemented in r175729. Not quite perfect for C++98 (a "pass by value + swap" implementation could be used if the type was default constructible/cheaply swappable) but C++98 perf isn't critical (just a purist/perfectionist issue) - I've left a FIXME about that. I /think/ this is about perfect for C++11.</div>
<div><br></div><div style>- David</div></div><br></div></div>