diff options
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 12ac30a..b661187 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3158,7 +3158,7 @@ add_implicitly_declared_members (tree t, tree* access_decls, TYPE_HAS_COPY_ASSIGN (t) = 1; TYPE_HAS_CONST_COPY_ASSIGN (t) = !cant_have_const_assignment; CLASSTYPE_LAZY_COPY_ASSIGN (t) = 1; - if (move_ok) + if (move_ok && !LAMBDA_TYPE_P (t)) CLASSTYPE_LAZY_MOVE_ASSIGN (t) = 1; } @@ -5624,13 +5624,6 @@ check_bases_and_members (tree t) 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_COMPLEX_DFLT (t) = 1; - TYPE_HAS_COMPLEX_COPY_ASSIGN (t) = 1; - CLASSTYPE_LAZY_MOVE_ASSIGN (t) = 0; - /* "This class type is not an aggregate." */ CLASSTYPE_NON_AGGREGATE (t) = 1; } |