This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54165] Cast to "void" should not implicitly call conversion functions


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-qualiïed)
object to [...] (possibly cv-qualiïed) 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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]