https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86932

            Bug ID: 86932
           Summary: [8 Regression] Empty non-type template parameter pack
                    not considered for SFINAE.
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zennehoy at gmail dot com
  Target Milestone: ---

The following code incorrectly compiles under GCC 8.1/8.2, but fails (as
expected) with GCC 7.3 and other compilers:

    #include <type_traits>

    template<class U, typename std::enable_if_t<std::is_const_v<U>>...>
    void f() {}

    int main()
    {
        f<int>();
    }

The originating stackoverflow discussion about this issue can be found here:
https://stackoverflow.com/q/51787713/694509

A working example can be found on godbolt:
https://godbolt.org/g/Rb46qQ

Reply via email to