This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,c++] describe reasons for function template overload resolution failure
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, jason at redhat dot com
- Date: Mon, 14 Feb 2011 18:19:00 -0800
- Subject: Re: [PATCH,c++] describe reasons for function template overload resolution failure
- References: <20110202210501.GB12787@nightcrawler>
On 2/2/2011 1:05 PM, Nathan Froyd wrote:
> In my patch for PR 45329, diagnostics for overload resolution failure, I
> overlooked one very important class of failures: failures when dealing
> with overload candidates that are function templates. Specifically, we
> ought to diagnose any reasons why template argument deduction failed.
> The patch below attempts to rectify that situation. It's a bit big for
> stage 4; it'd be great if it went in to 4.6, but I expect this to go in
> for the 4.7 timeframe. It's also not quite done, so I'd appreciate
> feedback on whether the idea and implementation are sound.
I think the idea is sound and the improved diagnostics valuable.
I do think that, though, this is 4.7 material -- it just doesn't seem
bug-fixy enough for 4.6.
> I chose to permit NULL unification_infos to be passed around; I think
> it'd be just as valid to require the unification_info to be non-NULL,
> though.
I don't have an opinion on this -- I think either way is perfectly
reasonable. I guess, in general, requiring a non-NULL input is a bit
less error-prone, though, so I might tend that way. A caller that
doesn't want the info can always just ignore the result...
Thank you,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713