Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | lawrence.jones@siemens.com |
|---|---|
| Newsgroups | comp.std.c |
| Subject | Re: qualified rvalues |
| Date | 2012-06-23 17:31 -0400 |
| Organization | Siemens PLM Software |
| Message-ID | <17phb9-agb.ln1@jones.homeip.net> (permalink) |
| References | <4FE5C464.5090305@loria.fr> |
Jens Gustedt <jens.gustedt@loria.fr> wrote: > > In essence I didn't find that the standard has much to say when it > comes to qualified types for rvalues. They definitively do exist, > since the cast operator explicitly specifies that the type could be > qualified. The section on casts also has the only indication I found > that relates to rvalues. There is a footnote (thus not normative) that > says > > > 89) A cast does not yield an lvalue. Thus, a cast to a qualified > > type has the same effect as a cast to the unqualified version of the > > type. The other relevant passages are 6.7.3p4: The properties associated with qualified types are meaningful only for expressions that are lvalues. (which is the justification for the above footnote [104 in C11]), and 6.3.2.1p2: Except when it is the operand of the sizeof operator, the unary & operator, the ++ operator, the -- operator, or the left operand of the . operator or an assignment operator, an lvalue that does not have array type is converted to the value stored in the designated object (and is no longer an lvalue); this is called /lvalue conversion/. If the lvalue has qualified type, the value has the unqualified version of the type of the lvalue; > That could mean two things: > > (1) the effective type of the resulting rvalue is unqualified > (2) all operators that will accept the rvalue as an operand will act > all the same whether the type is qualified or not Based on the above, I believe that (1) was what the committee intended. -- Larry Jones Who, ME? Who?! Me?? WHO... Me?! Who, me??? -- Calvin
Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
qualified rvalues Jens Gustedt <jens.gustedt@loria.fr> - 2012-06-23 15:28 +0200
Re: qualified rvalues lawrence.jones@siemens.com - 2012-06-23 17:31 -0400
Re: qualified rvalues Jens Gustedt <jens.gustedt@loria.fr> - 2012-06-24 01:09 +0200
csiph-web