G++ Bug in finding template instanciation
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sun May 7 14:42:00 GMT 2000
> The attached source doesn't compile, at least under Windows.
> Apparently, the compiler is having trouble finding the template
> function which takes the references to the nested class; unnest Iter,
> and it works.
Thanks for your bug report. I believe the bug is in your code, and not
in the compiler. In the operator-, the template parameter only appears
in non-deduced contexts (14.8.2.4/4, see also example
14.8.2.4/14). Therefore, template argument deduction fails for this
template candidate. As a result, the compiler ends up with no
candidates, and the program is ill-formed.
Regards,
Martin
More information about the Gcc-bugs
mailing list