aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 3822882..4d6d80f 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -489,7 +489,7 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,
if (by_reference_p)
{
type = build_reference_type (type);
- if (!dependent_type_p (type) && !real_lvalue_p (initializer))
+ if (!dependent_type_p (type) && !lvalue_p (initializer))
error ("cannot capture %qE by reference", initializer);
}
else