On Thu, Aug 23, 2018 at 10:44:30AM -0400, Marek Polacek wrote:
> +T
> +fn3 (const T t)
> +{
> +  // t is const: will decay into move.
> +  return t;
> +}
> +
> +T
> +fn4 (const T t)
> +{
> +  // t is const: will decay into move despite std::move, so it's redundant.
> +  return std::move (t); // { dg-warning "redundant move in return statement" 
> }
> +}

This should read "decay into copy".  We can't move from a const object.  
Consider
it fixed.

Marek

Reply via email to