#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