This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: G++ Bug in finding template instanciation


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]