[C++ PATCH] Handle ptmf default conversions while matching a template argument (fix PR/10126)

Jason Merrill jason@redhat.com
Tue Dec 2 05:53:00 GMT 2003


On Wed, 19 Nov 2003 23:26:23 +0100, "Giovanni Bajo" <giovannibajo@libero.it> wrote:

> while trying to convert a pointer to member function to match a template
> argument (in convert_nontype_argument), we call instantiate_type on the
> ADDR_EXPR to check if it matches the template parameter type. The code was
> assuming that the instantiated type (if any) would have had to match exactly,
> but standard conversions can happen on the way, and we should treat them as a
> failure in the match (they're not allowed in this context), rather than abort.

> This fixes c++/10126, and its duplicate c++/13040.

I just added a comment to the PR.

The patch is OK, but please change the testcase to use &D::I rather than
&B::I.

Jason



More information about the Gcc-patches mailing list