PR c++/55680
* pt.c (maybe_process_partial_specialization): A lambda
isn't what's being specialized.
From-SVN: r196042
2013-02-13 Jason Merrill <jason@redhat.com>
+ PR c++/55680
+ * pt.c (maybe_process_partial_specialization): A lambda
+ isn't what's being specialized.
+
PR c++/55710
* semantics.c (maybe_add_lambda_conv_op): Mark static thunk
TREE_USED.
if (type == error_mark_node)
return error_mark_node;
+ /* A lambda that appears in specialization context is not itself a
+ specialization. */
+ if (CLASS_TYPE_P (type) && CLASSTYPE_LAMBDA_EXPR (type))
+ return type;
+
if (TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM)
{
error ("name of class shadows template template parameter %qD",
--- /dev/null
+// PR c++/55680
+// { dg-do compile { target c++11 } }
+
+template <class T> struct X {
+ static void (* code ) ();
+};
+template <> void (* X<int>::code ) () = [](){};