https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89421

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We have
 1235   /* Lambda functions in templates aren't instantiated normally, but
through
 1236      tsubst_lambda_expr.  */
 1237   if (lambda_fn_in_template_p (tmpl))
 1238     return NULL_TREE;

but since r266056 we allow lambdas in a template-parameter-list:

--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2988,12 +2988,6 @@ begin_class_definition (tree t)
   if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t)))
     return error_mark_node;

-  if (processing_template_parmlist)
-    {
-      error ("definition of %q#T inside template parameter list", t);
-      return error_mark_node;
-    }
-
   /* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733
      are passed the same as decimal scalar types.  */
   if (TREE_CODE (t) == RECORD_TYPE

Jason, should we also return NULL_TREE for lambdas inside template parameter
list (in retrieve_specialization)?

Reply via email to