aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
new file mode 100644
index 000000000..d3f434195
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
@@ -0,0 +1,12 @@
+// { dg-do run { target c++11 } }
+#include <cassert>
+
+int main() {
+ int i = 1, j = 2;
+ [&i, j] () mutable -> void { i = 0; j = 0; } ();
+ assert(i == 0);
+ assert(j == 2);
+
+ return 0;
+}
+