On 09/19/2014 11:40 AM, Paolo Carlini wrote:
   if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
-      || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
+      || (TREE_CODE (decl) == FUNCTION_DECL
+         && (DECL_LOCAL_FUNCTION_P (decl) || LAMBDA_FUNCTION_P (decl))))
     /* You can't have a function template declaration in a local
        scope, nor you can you define a member of a class template in a
        local scope.  */

Rather than adding it to this condition, let's group the new test with the other lambda test, immediately below.

Jason

Reply via email to