[Bug libstdc++/23781] Implicit conversion from NULL to list<T>::iterator

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Thu Sep 8 20:55:00 GMT 2005


------- Additional Comments From gdr at integrable-solutions dot net  2005-09-08 20:55 -------
Subject: Re:  Implicit conversion from NULL to list<T>::iterator

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Note ICC also accepts this code too.

yes, but that is irrelevant.  
We don't accept
   
    #include <vector>
    #include <string>
  
    int main()
    {
       using namespace std;
       vector<string>::iterator p = NULL;
    }

for proper type checking.  The list iterator constructor accepting a
pointer should be explicit.

Thanks Marc,

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23781



More information about the Gcc-bugs mailing list