From: Jason Merrill Date: Thu, 21 Jul 2016 06:05:44 +0000 (-0400) Subject: PR c++/70942 - generic lambda with auto&& parameter. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4683f47cff862d23d48c2b9c6938b8b0e6b3253c;p=gcc.git PR c++/70942 - generic lambda with auto&& parameter. * g++.dg/cpp1y/lambda-generic-conv3.C: New. From-SVN: r238561 --- 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 index 00000000000..8ec6a2092d7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-conv3.C @@ -0,0 +1,10 @@ +// PR c++/70942 +// { dg-do compile { target c++14 } } + +int main() +{ + int x = 0; + [](auto&& xv){ + static_cast(xv) = 1; + }(x); +}