In such case:
int x=0;
(x)=5;
Why is (x)
a valid lvalue (and decltype((x))
gives int&
)?
What do parentheses mean here? Is there any similar situation?
In such case:
int x=0;
(x)=5;
Why is (x)
a valid lvalue (and decltype((x))
gives int&
)?
What do parentheses mean here? Is there any similar situation?
decltype(x)
inspects the type of x
entity. But when you put x
inside parentheses, decltype
have rules for deducing types for these expressions:
T&&
;T&
;T
.