This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 57543
- From: Jason Merrill <jason at redhat dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 May 2014 11:49:29 -0400
- Subject: Re: [C++ Patch] PR 57543
- Authentication-results: sourceware.org; auth=none
- References: <5384935D dot 5020406 at oracle dot com> <5384C817 dot 9010004 at redhat dot com> <5385064C dot 9020203 at oracle dot com> <53850C1F dot 7020902 at oracle dot com> <5385B756 dot 8070707 at oracle dot com> <5385FD69 dot 6020000 at redhat dot com> <538602EF dot 9060605 at oracle dot com>
On 05/28/2014 11:38 AM, Paolo Carlini wrote:
But unconditionally doesn't work, without doing something more. For
example for the first test, as reported: when current_class_type is set
and equal to "struct X<int>", class_of_this_parm is "struct X<
<template-parameter-1-1> >".
Right, it needs to be the substituted this parameter.
Let's remember when we had a trailing return type (probably by setting a
flag in splice_late_return_type and then preserving it when we rebuild
METHOD/FUNCTION_TYPEs) and if it's set, tsubst the return type after the
argument types rather than before so that SFINAE consistently works in
lexical order.
Jason