[Bug c++/86932] New: [8 Regression] Empty non-type template parameter pack not considered for SFINAE.

2018-08-13 Thread zennehoy at gmail dot com
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 

template>...>
void f() {}

int main()
{
f();
}

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

[Bug c++/86932] [8 Regression] Empty non-type template parameter pack not considered for SFINAE.

2018-08-13 Thread zennehoy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86932

--- Comment #1 from zennehoy  ---
Sorry, I included the problematic void non-type template parameter pack.

The type of std::enable_if_t should be specified as something other than void,
e.g., int:

#include 

template, int>...>
void f() {}

int main()
{
f();
}