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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2290fe0..791c8de 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -941,7 +941,8 @@ maybe_generic_this_capture (tree object, tree fns)
fns = TREE_OPERAND (fns, 0);
for (lkp_iterator iter (fns); iter; ++iter)
- if ((!id_expr || TREE_CODE (*iter) == TEMPLATE_DECL)
+ if (((!id_expr && TREE_CODE (*iter) != USING_DECL)
+ || TREE_CODE (*iter) == TEMPLATE_DECL)
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (*iter))
{
/* Found a non-static member. Capture this. */