public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8097] c++: Add testcase for already fixed PR [PR90215] Date: Fri, 9 Apr 2021 15:38:28 +0000 (GMT) [thread overview] Message-ID: <20210409153828.CF91F39960E5@sourceware.org> (raw) https://gcc.gnu.org/g:00c3c31be43c018870569a599200a8af84956487 commit r11-8097-g00c3c31be43c018870569a599200a8af84956487 Author: Patrick Palka <ppalka@redhat.com> Date: Fri Apr 9 11:37:42 2021 -0400 c++: Add testcase for already fixed PR [PR90215] We accept this testcase after r11-7985. gcc/testsuite/ChangeLog: PR c++/90215 * g++.dg/cpp1z/fold-lambda4.C: New test. Diff: --- gcc/testsuite/g++.dg/cpp1z/fold-lambda4.C | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gcc/testsuite/g++.dg/cpp1z/fold-lambda4.C b/gcc/testsuite/g++.dg/cpp1z/fold-lambda4.C new file mode 100644 index 00000000000..b8bae8602ad --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/fold-lambda4.C @@ -0,0 +1,30 @@ +// PR c++/90215 +// { dg-do compile { target c++17 } } + +struct X +{ + template <class F> + void f(F f) + { + f(0); + } +}; + +template <class... Xs> +void bug(Xs... xs) +{ + int i; + + [&](auto&... ys) + { + (xs.f([&](auto) + { + ys; + }), ...); + }(i); +} + +int main() +{ + bug(X{}); +}
reply other threads:[~2021-04-09 15:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210409153828.CF91F39960E5@sourceware.org \ --to=ppalka@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).