Topic: sizeof and lvalue-to-rvalue conversion
Author: "Sanjay" <sanjayp@ddi.com>
Date: 1997/08/14 Raw View
Hi,
I noticed in the WP 5.3.3 [expr.sizeof] para 4:
"The lvalue-to-rvalue(4.1), array-to-pointer(4.2), and
function-to-pointer(4.3) standard conversions are not applied to the
operand of sizeof."
I am wondering, if there are any cases where sizeof will give a different
result even if the lvalue-to-rvalue conversion is applied.
Sanjay
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: David Vandevoorde <daveed@vandevoorde.com>
Date: 1997/08/15 Raw View
Sanjay wrote:
> I noticed in the WP 5.3.3 [expr.sizeof] para 4:
>
> "The lvalue-to-rvalue(4.1), array-to-pointer(4.2), and
> function-to-pointer(4.3) standard conversions are not applied to the
> operand of sizeof."
>
> I am wondering, if there are any cases where sizeof will give a
> different result even if the lvalue-to-rvalue conversion is applied.
No, but it clarifies that the sizeof operator has no side-effects
(such as the ones of accessing the value of a volatile object).
Daveed
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]