Topic: Is a void expression an rvalue?
Author: Gerard Weatherby <gerardw@alum.mit.edu>
Date: 1997/10/01 Raw View
Aaron S. Binns wrote:
> 3.10.5 says that function calls that don't return references are
> rvalues. Since
> void isn't a reference type, I guess this implies that void returning
> functions
> are rvalues.
Sure. Check out:
3.10.9 ... Rvalues shall always have complete types
or the void type; ...
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1997/09/26 Raw View
"Aaron S. Binns" <asbinn@rstcorp.com> writes:
>In the Dec. 2, 1996 DWP, 3.10.1 says:
>
> Every expression is either an lvalue or an rvalue.
>
>Which of these is a fuction call to a function with a void return type?
It is an rvalue.
>3.10.5 says that function calls that don't return references are
>rvalues. Since
>void isn't a reference type, I guess this implies that void returning
>functions
>are rvalues.
Correct.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]