This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: G++ Bug in finding template instanciation
- To: kanze at gabi-soft dot de
- Subject: Re: G++ Bug in finding template instanciation
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 7 May 2000 23:38:01 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <200005072041.WAA28474@gabi-soft.de>
> 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