Skip to main content

All Questions

Filter by
Sorted by
Tagged with
8 votes
1 answer
348 views

Does lvalue-to-rvalue conversion ever happen to class types?

Practically every example of lvalue-to-rvalue conversion I've seen on the web relates to fundamental types like int etc. I couldn't find an example of l2r applicable to class types myself; in all the ...
ledonter's user avatar
  • 1,669
54 votes
3 answers
26k views

When does lvalue-to-rvalue conversion happen, how does it work, and can it fail?

I see the term "lvalue-to-rvalue conversion" used in many places throughout the C++ standard. This kind of conversion is often done implicitly, as far as I can tell. One unexpected (to me) ...
orm's user avatar
  • 2,975
3 votes
5 answers
2k views

Will an lvalue to rvalue conversion happen?

C++ Standard (4/5) the lvalue-to-rvalue conversion is not done on the operand of the unary & operator. For example: int x; int *p = &x; In the above case, are p are &x both lvalues? ...
user1086635's user avatar
  • 1,544