<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 1:00 AM, David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 6 Oct 2014, at 21:39, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
<br>
> I doubt it's reliable enough to warn on that generally - the user might've wanted to return an empty value in that situation. (think of the case where T is std::unique_ptr, with a well defined move-from state that users might rely on).<br>
<br>
</span>I think that the number of times that I've used that pattern is a tiny handful of the times where I've used std::move, so perhaps an attribute to flag that 'yes, I really meant to return this value even though it's now empty' is the way forward?<br></blockquote><div><br></div><div>Perhaps - I'm just suggesting some of the gotchas I'd want to keep an eye out for when evaluating the quality of such a warning. Numbers trump everything - if someone implements it, surveys a large codebase, and finds few enough false positives (with reasonable ways to rewrite them to not trigger the warning) - that's success.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
David<br>
<br>
</font></span></blockquote></div><br></div></div>