[Bug c++/43894] with -std=c++0x, auto and for loop does not play nice when another variable is involved

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Apr 26 15:14:00 GMT 2010



------- Comment #1 from redi at gcc dot gnu dot org  2010-04-26 15:13 -------
I don't think this is valid, it's equivalent to

typedef std::map<int,int>::iterator Iter;
for (Iter itr = dummy.begin(), int i=0; i<5; i++)

which is invalid because you cannot declare two different types in a
for-init-statement


-- 


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



More information about the Gcc-bugs mailing list