This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Handle ptmf default conversions while matching atemplate argument (fix PR/10126)
- From: Jason Merrill <jason at redhat dot com>
- To: "Giovanni Bajo" <giovannibajo at libero dot it>
- Cc: <gcc-patches at gcc dot gnu dot org>, "Bernardo Innocenti" <bernie at develer dot com>
- Date: Tue, 02 Dec 2003 00:52:02 -0500
- Subject: Re: [C++ PATCH] Handle ptmf default conversions while matching atemplate argument (fix PR/10126)
- References: <0e6101c3aeec$2a8fd510$1c01a8c0@prograph.it>
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