This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28157] New: cannot create STL iterator using template types
- From: "jaybny at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2006 21:17:52 -0000
- Subject: [Bug c++/28157] New: cannot create STL iterator using template types
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#include <map>
template<class C, class D>
int testit(const std::map<C,D> & m) {
std::map<C,D>::const_iterator iter = m.begin();
return 0;
}
This code does not compile using G++ on cygwin
$ g++ -c utilities.cpp
utilities.cpp: In function `int testit(const std::map<C, D, std::less<_Key>,
std::allocator<std::pair<const _Key, _Tp> > >&)':
utilities.cpp:6: error: expected `;' before "iter"
--
Summary: cannot create STL iterator using template types
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jaybny at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28157