Let say I have the following code
int main(){
new int; // Is this expression l-value or r-value??
return 0;
}
I know that lvalues are persistent object (since it has specific place in memory from where we can access latter even after the expression ends) and rvalues are temporary object (it has no place in memory and vaporizes after the expression ends).
I saw some where that it is rvalue expression. How can it be rvalue if the expression returns an address ( a specific place in memory). Or Is it rvalue because what ever the expression new int returns (an address value), it vanishes and could never be caught after the expression ends.