Why this is allowed:
int a = 0;
auto&& b = a;
while this is not:
int a = 0;
int&& b = a;
I understand that an l-value cannot be bound to an r-value reference, so why (or how) in this specific case auto&& differs from int&& ?
Why this is allowed:
int a = 0;
auto&& b = a;
while this is not:
int a = 0;
int&& b = a;
I understand that an l-value cannot be bound to an r-value reference, so why (or how) in this specific case auto&& differs from int&& ?