From 2eb409c65a287a7b36b3499084ec594c51fe95b1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 28 Feb 2019 19:10:28 -0500 Subject: [PATCH] * g++.dg/cpp1z/fold-lambda3.C: Add test for 88183. From-SVN: r269294 --- gcc/testsuite/g++.dg/cpp1z/fold-lambda3.C | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/fold-lambda3.C 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); +} -- 2.30.2