[Bug c++/54165] Cast to "void" should not implicitly call conversion functions
ed at catmur dot co.uk
gcc-bugzilla@gcc.gnu.org
Fri Aug 3 15:45:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54165
Ed Catmur <ed at catmur dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ed at catmur dot co.uk
--- Comment #1 from Ed Catmur <ed at catmur dot co.uk> 2012-08-03 15:44:46 UTC ---
The standard reads:
12.3.2 Conversion functions [class.conv.fct]
(1) A conversion function is never used to convert a (possibly cv-qualified)
object to [...] (possibly cv-qualified) void.
116) A conversion to void does not invoke any conversion function (5.2.9).
5.2.9 Static cast [expr.static.cast]
(6) Any expression can be explicitly converted to type cv void, in which case
it becomes a discarded-value expression (Clause 5).
More information about the Gcc-bugs
mailing list