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?