This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for default template argument access control SFINAE
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 25 Aug 2012 19:09:53 +0200
- Subject: Re: C++ PATCH for default template argument access control SFINAE
- References: <503846AF.3070700@redhat.com>
On 08/25/2012 05:29 AM, Jason Merrill wrote:
I noticed that the earlier work on access control SFINAE didn't handle
default template arguments; we weren't checking their access against
the right declarations at all. In order to do that, we need to
generate the DECL to compare against in fn_type_unification, when we
still know what accesses we need to check. Doing this complicated
detection of excessive deduction recursion somewhat, since we really
want to avoid treating excess recursion as a SFINAE failure; once we
hit that error, we can't really generate any FUNCTION_DECLs.
Ah, great thanks!
This morning, when I committed my patchlet, I noticed that there is
nothing in the testsuite ChangeLog about g++.dg/cpp0x/fntmpdefarg3.C, I
suppose it's unintended, I can fix that at the first occasion... (also,
the testcase itself has a few a little mysterious commented out lines,
but I'm not going to insist ;) ;)
Paolo.