While T&&
is used with templates as forwarding reference or universal reference (as Scott Meyers calls them), I have seen some blogs use auto&&
in code samples. I think auto
itself should be enough, however, Herb Sutter in CppCon 2014 says: Never use auto&&
for local variables
Why is that?
Seeing all replies , I feel I think I should have asked the contra. The general coding guidelines notwithstanding are there any good use cases of using auto&& inside a function body for code correctness and maintainability .