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++/52174] New: Implicit conversion of nullptr to bool


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


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