On 09/11/2013 03:38 AM, Adam Butcher wrote:
This is not a complete enough description. It only ICEs instantiating the call op through the decltype return of the conversion op if the return type of the call op is a deduced one (i.e. unspecified or specified explicitly as 'auto'). If the lambda call op is instantiated explicitly (i.e. the lambda is called) prior to using the conversion op then all is well. It seems to only occur if there are variables declared within the lambda body or accessible via the lambda's 'this'.
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?
Jason