From: Jason Merrill Date: Fri, 1 Mar 2019 00:10:28 +0000 (-0500) Subject: * g++.dg/cpp1z/fold-lambda3.C: Add test for 88183. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2eb409c65a287a7b36b3499084ec594c51fe95b1;p=gcc.git * g++.dg/cpp1z/fold-lambda3.C: Add test for 88183. From-SVN: r269294 --- diff --git a/gcc/testsuite/g++.dg/cpp1z/fold-lambda3.C b/gcc/testsuite/g++.dg/cpp1z/fold-lambda3.C new file mode 100644 index 00000000000..5a53c866284 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/fold-lambda3.C @@ -0,0 +1,19 @@ +// PR c++/88183 +// { dg-do compile { target c++17 } } + +struct A { int i; }; + +template T& g(T); + +template +void f(U u, Vs... vs) +{ + [vs...](auto x) { + (g(x) .* ... .* vs) = 42; + }(u); +} + +int main() +{ + f(A(), &A::i); +}