diff options
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index b55c2f8..c94fe8e 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -702,7 +702,7 @@ add_default_capture (tree lambda_stack, tree id, tree initializer) initializer = convert_from_reference (var); /* Warn about deprecated implicit capture of this via [=]. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && this_capture_p && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda) == CPLD_COPY) { |