This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52174] New: Implicit conversion of nullptr to bool
- From: "lsoltysiak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Feb 2012 16:44:47 +0000
- Subject: [Bug c++/52174] New: Implicit conversion of nullptr to bool
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52174
Bug #: 52174
Summary: Implicit conversion of nullptr to bool
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lsoltysiak@gmail.com
Document 'A name for the null pointer: nullptr (revision 4)' states that
implicit conversion of nullptr to bool is not allowed. Unfortunately in g++
4.7.0, this requirement is not fulfilled. See example below.
if (nullptr) //shall return error, implicit conversion to bool not allowed