CLASSTYPE_LAZY_COPY_CTOR (t) = 1;
}
+ /* Currently only lambdas get a lazy move ctor. */
+ if (LAMBDA_TYPE_P (t))
+ CLASSTYPE_LAZY_MOVE_CTOR (t) = 1;
+
/* If there is no assignment operator, one will be created if and
when it is needed. For now, just record whether or not the type
of the parameter to the assignment operator will be a const or
cant_have_const_ctor,
no_const_asn_ref);
+ if (LAMBDA_TYPE_P (t))
+ {
+ /* "The closure type associated with a lambda-expression has a deleted
+ default constructor and a deleted copy assignment operator." */
+ TYPE_NEEDS_CONSTRUCTING (t) = 1;
+ TYPE_HAS_DEFAULT_CONSTRUCTOR (t) = 0;
+ CLASSTYPE_LAZY_DEFAULT_CTOR (t) = 0;
+ TYPE_HAS_ASSIGN_REF (t) = 0;
+ CLASSTYPE_LAZY_ASSIGNMENT_OP (t) = 0;
+
+ /* "This class type is not an aggregate." */
+ CLASSTYPE_NON_AGGREGATE (t) = 1;
+ }
+
/* Create the in-charge and not-in-charge variants of constructors
and destructors. */
clone_constructors_and_destructors (t);
/* If we're not defining a class, there's nothing to do. */
if (!(innermost_scope_kind() == sk_class
- && TYPE_BEING_DEFINED (current_class_type)))
+ && TYPE_BEING_DEFINED (current_class_type)
+ && !LAMBDA_TYPE_P (current_class_type)))
return;
/* If there's already a binding for this NAME, then we don't have