Open
Description
#include <string>
#include <vector>
struct S {
std::string s;
};
void f(std::string a) {
std::vector<S> v;
v.push_back({std::move(a)}); // no warning
}
https://godbolt.org/z/4jrj1M6hY
With C++20, v.emplace_back(std::move(a));
should be used.