aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-04-22 13:32:44 -0400
committerPatrick Palka <ppalka@redhat.com>2021-04-22 13:32:44 -0400
commit3275f2e2af24541f55462c23af4c6530ac12c5e2 (patch)
tree2137514199223033f14abae9f835c0080c6c1ac8 /gcc
parent330cc29c06306ebf7bd3b2d37704cc69944923ff (diff)
downloadgcc-3275f2e2af24541f55462c23af4c6530ac12c5e2.zip
gcc-3275f2e2af24541f55462c23af4c6530ac12c5e2.tar.gz
gcc-3275f2e2af24541f55462c23af4c6530ac12c5e2.tar.bz2
c++: Add testcase for already fixed PR [PR84689]
We correctly accept this testcase since r11-1638. gcc/testsuite/ChangeLog: PR c++/84689 * g++.dg/cpp0x/sfinae67.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae67.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae67.C b/gcc/testsuite/g++.dg/cpp0x/sfinae67.C
new file mode 100644
index 0000000..cfed92a
--- /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;