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 libstdc++/23781] New: Implicit conversion from NULL to list<T>::iterator


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


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