public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] c++: Add testcase for already fixed PR [PR94102]
@ 2021-04-29 17:38 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2021-04-29 17:38 UTC (permalink / raw)
  To: Jason Merrill, GCC Patches

We correctly accept this testcase since r11-1571.

Tested x86_64-pc-linux-gnu, applying to trunk.

gcc/testsuite/ChangeLog:

	PR c++/94102
	* g++.dg/cpp1z/class-deduction87.C: New test.
---
 gcc/testsuite/g++.dg/cpp1z/class-deduction87.C | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction87.C

diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
new file mode 100644
index 00000000000..37296a435c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction87.C
@@ -0,0 +1,15 @@
+// PR c++/94102
+// { dg-do compile { target c++17 } }
+
+namespace std {
+  template <typename _Tp> using decay_t = _Tp;
+}
+template <typename... B> struct Merged : B... {
+  template <typename... T> Merged(T... t) : B(t)... {}
+};
+template <typename... T> Merged(T...) -> Merged<std::decay_t<T>...>;
+int main() {
+  auto l1 = [] {};
+  auto l2 = [](int i) { return i; };
+  Merged(l1, l2);
+}

base-commit: fb9f5e1028df0fe6f2ff9d220efd75970e46bff0
-- 
2.31.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-29 17:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 17:38 [pushed] c++: Add testcase for already fixed PR [PR94102] Marek Polacek

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).