decltype(auto) func(int&& n)
{
return (n);
}
clang 12.0.1 accepts this code, but gcc 11.2.1 rejects it with:
error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
gcc seems to use return type int &&, but with n inside parenthesis, is that correct?