[Bug c++/56449] New: operator-> in a template class can lead to infinite template instantiation
basil at list dot ru
gcc-bugzilla@gcc.gnu.org
Mon Feb 25 22:38:00 GMT 2013
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: unassigned@gcc.gnu.org
ReportedBy: basil@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.
More information about the Gcc-bugs
mailing list