diff options
author | Patrick Palka <ppalka@redhat.com> | 2021-04-22 13:32:44 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2021-04-22 13:32:44 -0400 |
commit | 3275f2e2af24541f55462c23af4c6530ac12c5e2 (patch) | |
tree | 2137514199223033f14abae9f835c0080c6c1ac8 /gcc | |
parent | 330cc29c06306ebf7bd3b2d37704cc69944923ff (diff) | |
download | gcc-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.C | 20 |
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; |