Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-10-13 12:56:11

Terje Slettebø <tslettebo_at_[hidden]> writes:

| >From: "Daniel Frey" <daniel.frey_at_[hidden]>
| >>Gabriel Dos Reis wrote:
| >>
| >> | To me, it is something that I can read.
| >>
| >> Interesting. So you can read a reference. How?
| >I knew it was going in the wrong direction :) I mean the sematic of
| >"value" against the semantic of "object". I don't refer to the standard
| >here, but to the meaning of these words in the natural language (of a
| >C++ programmer :).
| I think the discussion could be clearer if "lvalue" or "rvalue" is used,
| instead of "value" and "object". An object is a value. See e.g. 3.10,
| "Lvalues and rvalues".

Note however that the definitions found in 3.10 aren't really helpful
in distinguishing lvalues from rvalues. Just look at the footnote to get
some feeling :-)

I think the whole thing would have been clearer if the notion of
lvalue were refelected at the type-system level.

| >> | It's different from an "object", which is something you can change.
| >An example: 42 is a value.
| Yes, an rvalue.
| >An 'int' which holds the value 42 is an
| >"object", as you can modify it.
| And that's an lvalue.

That is not clear: int(42) designates an object; and at the same time,
it is an rvalue (according to the standard).

-- Gaby

Boost list run by bdawes at, gregod at, cpdaniel at, john at