On 2009-12-22 08:45:00 -0500, "Steven Schveighoffer" <[email protected]> said:

The point is, wrapper types shouldn't have second-class citizenship as rvalues to pointers and references. There's got to be a way to identify types as being lvalues even though the compiler doesn't see it that way. If you can accomplish that, then I have no problem disallowing setting members of true rvalues.

What you need is tail const. Lvalues are similar to tail-const values: can't change them, but can change what they point to. The lvalueness is not transitive, so a transitive const isn't appropriate for representing lvalues.

Then of course you need to annotate member functions as being tail-const, and there the const system becomes more complicated.

--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to