summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
new file mode 100644
index 000000000..ed0565fa9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
@@ -0,0 +1,13 @@
+// { dg-do run }
+// { dg-options "-std=c++0x" }
+#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;
+}
+