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 c_inhibit_evaluation_warnings.

Jason

Reply via email to