public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] c++: Add testcase for already fixed PR [PR84689]
@ 2021-04-22 17:42 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2021-04-22 17:42 UTC (permalink / raw)
  To: gcc-patches

We correctly accept this testcase since r11-1638.

gcc/testsuite/ChangeLog:

	PR c++/84689
	* g++.dg/cpp0x/sfinae67.C: New test.
---
 gcc/testsuite/g++.dg/cpp0x/sfinae67.C | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/sfinae67.C

diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae67.C b/gcc/testsuite/g++.dg/cpp0x/sfinae67.C
new file mode 100644
index 00000000000..cfed92ad472
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae67.C
@@ -0,0 +1,20 @@
+// PR c++/84689
+// { dg-do compile { target c++11 } }
+
+struct base {
+  void operator()();
+};
+
+struct a : base { };
+struct b : base { };
+
+struct f : a, b {
+  using a::operator();
+  using b::operator();
+};
+
+template <class T> auto g(int) -> decltype(T()());
+template <class T> auto g(...) -> int;
+
+using type = decltype(g<f>(0));
+using type = int;
-- 
2.31.1.362.g311531c9de


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 17:42 [committed] c++: Add testcase for already fixed PR [PR84689] Patrick Palka

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