On 8/6/22 11:13, Marek Polacek wrote:
In this PR, Jon suggested extending the -Wredundant-move warning
to warn when the user is moving a const object as in:
struct T { };
T f(const T& t)
{
return std::move(t);
}
where the std::move is redundant, because T does not have
a T(con
In this PR, Jon suggested extending the -Wredundant-move warning
to warn when the user is moving a const object as in:
struct T { };
T f(const T& t)
{
return std::move(t);
}
where the std::move is redundant, because T does not have
a T(const T&&) constructor (which is very unlikely).