From: Patrick Palka Date: Thu, 22 Apr 2021 17:32:44 +0000 (-0400) Subject: c++: Add testcase for already fixed PR [PR84689] X-Git-Tag: basepoints/gcc-13~8243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3275f2e2af24541f55462c23af4c6530ac12c5e2;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae67.C b/gcc/testsuite/g++.dg/cpp0x/sfinae67.C new file mode 100644 index 000000000000..cfed92ad472f --- /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 auto g(int) -> decltype(T()()); +template auto g(...) -> int; + +using type = decltype(g(0)); +using type = int;