Remix.run Logo
koito17 3 days ago

Additionally, the "r" and "l" may lead one to incorrectly guess that rvalues and lvalues are related to their position in an expression. But alas, they aren't; there are lvalues that cannot appear in the left-hand side of an expression.

mzajc 3 days ago | parent | next [-]

Are you referring to consts? Besides those, I can't really think of a counterexample.

tonyarkles 3 days ago | parent [-]

https://en.cppreference.com/w/cpp/language/value_category.ht...

There’s some weird examples here involving functions, function pointers, template parameters, and a few other things.

nutjob2 3 days ago | parent | prev [-]

> cannot appear in the left-hand side of an expression

Do you mean assignment?