From: Jakub Jelinek Date: Fri, 14 May 2021 12:56:28 +0000 (+0200) Subject: testsuite: Add testcase for already fixed PR [PR90019] X-Git-Tag: basepoints/gcc-13~7514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d25809dbfe43917b3bed9454620fcc24f04c1e03;p=thirdparty%2Fgcc.git testsuite: Add testcase for already fixed PR [PR90019] 2021-05-14 Jakub Jelinek PR c++/90019 * g++.dg/cpp0x/sfinae68.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae68.C b/gcc/testsuite/g++.dg/cpp0x/sfinae68.C new file mode 100644 index 000000000000..d292b68bff63 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/sfinae68.C @@ -0,0 +1,23 @@ +// PR c++/90019 +// { dg-do compile { target c++11 } } + +template +struct enable_if { }; +template +struct enable_if { typedef T type; }; +template +using __enable_if_t = typename enable_if::type; +template +using enable_if_t = typename enable_if::type; + +template ...> void foo() {} +template ...> void foo() {} +template ...> void bar() {} +template ...> void bar() {} + +void test() +{ + bar<0>(); + bar<0,0>(); + foo<0>(); +}