This code compiles fine with 7 and trunk but fails with gcc8: https://godbolt.org/z/v1HN8B #include <type_traits> // gcc8 thinks these are ambiguous for <0> template <int I, std::enable_if_t<I == 0, int>...> void foo(){} template <int I, std::enable_if_t<I != 0, int>...> void foo(){} // but somehow these arn't for <0>, but are for <0,0> !? template <int I, int=0, std::enable_if_t<I == 0, int>...> void bar(){} template <int I, int=0, std::enable_if_t<I != 0, int>...> void bar(){} void test() { bar<0>(); // works bar<0,0>(); // boom foo<0>(); // boom }
Also seems to work on trunk, but it seems it was only fixed recently. So maybe this one has a duplicate.
GCC 8.4.0 has been released, adjusting target milestone.
Started with r8-544-g0ea37ae178ba156ec9f88134acc4bb13665c56ef Fixed for 9.1 with r9-6728-gce4609958f8db5cd64ec1c3bec624a36d8b35812 Therefore, dup of PR86932. *** This bug has been marked as a duplicate of bug 86932 ***
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d25809dbfe43917b3bed9454620fcc24f04c1e03 commit r12-799-gd25809dbfe43917b3bed9454620fcc24f04c1e03 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri May 14 14:56:28 2021 +0200 testsuite: Add testcase for already fixed PR [PR90019] 2021-05-14 Jakub Jelinek <jakub@redhat.com> PR c++/90019 * g++.dg/cpp0x/sfinae68.C: New test.