I rarely see decltype(auto)
but when I do it confuses me because it seems to do the same thing as auto
when returning from a function.
auto g() { return expr; }
decltype(auto) g() { return expr; }
What is the difference between these two syntaxes?
auto&& x = 5
then it would beint&&
but if I dodecltype(auto) x = 5
it would still beint&&
. – Crustacean