$ g++ bug.cpp -Wall -c bug.cpp: In function ‘void foo()’: bug.cpp:18: error: ‘foo()::A::less’ uses local type ‘foo()::A::less’ bug.cpp:18: error: trying to instantiate ‘template<class _Key, class _Compare, class _Alloc> class std::set’ bug.cpp:18: error: invalid type in declaration before ‘;’ token
comeau compiler accepts this code. -- Summary: [reject valid] error: trying to instantiate template... Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC target triplet: x86_64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29811