[cfe-dev] How to warn about std::move resulting in a copy

Daniel Dilts diltsman at outlook.com
Thu Sep 5 19:28:01 PDT 2013


I was listening to Scott Meyers's talk at Going Native 2013 and it was mentioned that a warning about a call to std::move resulting in a copy instead of a move would cause so many false positives that it would be useless.


Obviously it wouldn’t be useful to warn every time a return from std::move is copied, but maybe there is a subset that would be useful.  My thoughts on what set of circumstances might lead to a useful warning.


Value returned from std::move is copied


Value returned from std::move is movable


Value returned from std::move is const qualified



Is there other set of restrictions that might be needed to make this useful?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130906/b6913d03/attachment.html>


More information about the cfe-dev mailing list