Is there a difference between those those two
struct S;
int& foo(S&);
auto&& bar1(S& s) {
return foo(s);
}
decltype(auto) bar2(S& s) {
return foo(s);
}
for the compiler? I've been always using decltype(auto) in cases like this but is seems auto&& does the trick. Is it a coincidence or are both the identical?