This question asks if all temporaries are rvalue.
The answer is no, because if we consider this expression:
const int &ri = 2 + 3;
then, the very same temporary (2 + 3)
, which is an rvalue here, can be used
as an lvalue in a subsequent expression:
const int *pi = &ri;
so this temporary is not (only) an rvalue.
The logic statement temporary ==> rvalue
is then false.
However, we cannot write
const int &ri = &(2 + 3); // illegal, 2 + 3 -> temporary -> rvalue
or
int *i = &4; // illegal, 4 is an rvalue (literal)
or
int foo();
int *i = &foo(); // illegal, foo() -> temporary -> rvalue
Thus my question is, can we generate an rvalue in a certain expression without
having a temporary or a literal? Is rvalue ==> (temporary or literal)
true?