What is the reasoning behind the naming of “lvalue” and “rvalue”?

前端 未结 6 912
清酒与你
清酒与你 2021-01-16 07:30

What is the reasoning behind the naming of \"lvalue\" and \"rvalue\" in C/C++ (I know how they function)?

6条回答
  •  不要未来只要你来
    2021-01-16 07:57

    The 'l' in lvalue originated from 'left' value (as in from the left-hand side of the assignment operator); however, it now stands for location value, and refers to any object that occupies some identifiable location in memory (i.e. has an address). An rvalue is now anything that is not an lvalue.

提交回复
热议问题