http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56449
Bug #: 56449 Summary: operator-> in a template class can lead to infinite template instantiation Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ba...@list.ru Code example: template<class T> struct Loop { Loop<T*> operator->(); }; Loop<int> i, j = i->something; The compiler doesn't diagnose infinite Loop<> instantiation. Even CLI option ftemplate-depth=n doesn't help.