summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1y/lambda-init6.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init6.C8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
index 2b82bca457..d6c1587487 100644
--- a/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
@@ -1,12 +1,10 @@
-// Test that simple captures are not named in the closure type, but
-// initialized captures are named.
-// { dg-do compile { target c++1y } }
+// Test that captures are not named in the closure type.
+// { dg-do compile { target c++14 } }
int main()
{
int i;
auto lam = [i,j=42]{};
- lam.j;
- lam.j.foo; // { dg-error "::j" }
+ lam.j; // { dg-error "no member" }
lam.i; // { dg-error "no member" }
}