This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/23781] New: Implicit conversion from NULL to list<T>::iterator
- From: "Marc dot Boyer at enseeiht dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2005 15:55:24 -0000
- Subject: [Bug libstdc++/23781] New: Implicit conversion from NULL to list<T>::iterator
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code compiles, and should not.
#include <list>
int main( ) {
std::list< float >::iterator l_it= NULL ;
}
Replacing list per vector, it does no more compile, which is a better result.
I am not a C++ expert, but after a short reading of the slt_list.h file,
I guess that the problem is thet there is a constructor of a base class of
list<>::iterator that is not "explicit".
--
Summary: Implicit conversion from NULL to list<T>::iterator
Product: gcc
Version: 3.3.5
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Marc dot Boyer at enseeiht dot fr
CC: gcc-bugs at gcc dot gnu dot org,gdr at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23781