struct test {
test& foo(std::vector<int> const& v) {
assert(v.size() == 1); return *this;
}
void bar(std::vector<int> v) {}
};
void do_test() {
std::vector<int> v = { 42 };
return test{}.foo(v).bar(std::move(v)); // <-- here
}
clang-tidy gives an error bugprone-use-after-move on "here" string
Why it is use after move?