std::move is applied to a const object, which cannot be moved from and is copied instead
What it finds
Moving needs a non-const rvalue; std::move of a const object yields a const rvalue that binds to the copy constructor or copy assignment. The call reads as a move and copies.
From the rule's source, move_of_const.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/cpp:move-of-const" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/cpp:move-of-const] reason="..."tx0 explain tx0/cpp:move-of-const shows the same in the terminal. Found a false positive? Report it.