vague lvalue vs rvalue question

C

Chad

The following question actually stems from an old Chris Torek post.

And I quote from the following old CLC url

http://groups.google.com/group/comp...t&q=convert+lvalue+to+rvalue#cfeed3fda1d0ee46

"Mathematically speaking, unary `&' and `*' are inverse functions.
Unary `&' takes an lvalue of type `T' and produces an rvalue of
type `pointer to T'; unary `*' takes an rvalue of type `pointer to
T' and produces an lvalue of type `T'. The <value, type> pairs
from unary `&' must be distinct for distinct lvalues [*], and there
may be only one value produced for any particular lvalue. This
makes it an invertible function; `*' is then defined as the inverse
function. While `*' is a well-behaved function on conventional
architectures, all that the language requires is that it be the
inverse of `&'. "

I don't see how one is the inverse of the other. Can someone provide a
concrete example?


Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top