PR c++/70942 - generic lambda with auto&& parameter.
authorJason Merrill <jason@gcc.gnu.org>
Thu, 21 Jul 2016 06:05:44 +0000 (02:05 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 21 Jul 2016 06:05:44 +0000 (02:05 -0400)
* g++.dg/cpp1y/lambda-generic-conv3.C: New.

From-SVN: r238561

gcc/testsuite/g++.dg/cpp1y/lambda-generic-conv3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-conv3.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-conv3.C
new file mode 100644 (file)
index 0000000..8ec6a20
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/70942
+// { dg-do compile { target c++14 } }
+
+int main()
+{
+    int x = 0;
+    [](auto&& xv){
+        static_cast<decltype(xv)>(xv) = 1;
+    }(x);
+}