This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43894] with -std=c++0x, auto and for loop does not play nice when another variable is involved
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Apr 2010 15:13:44 -0000
- Subject: [Bug c++/43894] with -std=c++0x, auto and for loop does not play nice when another variable is involved
- References: <bug-43894-19089@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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