This is the mail archive of the
mailing list for the GCC project.
Re: V4 Lambda templates and implicit function templates.
- From: Jason Merrill <jason at redhat dot com>
- To: Adam Butcher <adam at jessamine dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, Gabriel Dos Reis <gdr at integrable-solutions dot net>, Andrew Sutton <andrew dot n dot sutton at gmail dot com>
- Date: Wed, 11 Sep 2013 11:25:51 -0400
- Subject: Re: V4 Lambda templates and implicit function templates.
- Authentication-results: sourceware.org; auth=none
- References: <1378779587-15362-1-git-send-email-adam at jessamine dot co dot uk> <494a4f7e9b38392bcd602695ed9fbaed at imap dot force9 dot net> <52308151 dot 5060400 at redhat dot com>
On 09/11/2013 10:42 AM, Jason Merrill wrote:
Sounds like the problem is that the compiler is trying to instantiate a
function while cp_unevaluated_operand is set. But that shouldn't be an
issue because push_to_top_level clears cp_unevaluated_operand. How does
it come to be set when instantiating the local variable?
Ah, I see: it's because instantiate_decl doesn't push_to_top_level for
function-local templates. We still need to save/restore
cp_unevaluated_operand in that case, and let's also do