This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51789] GCC does not consider SFINAE in template parameter list of template parameter pack


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|WAITING                     |NEW

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, it is not a complete testcase. It should have #include <type_traits>, or
here's a complete version:

namespace std {
template<typename T, typename U> struct is_same { static const bool value =
false; };
template<typename T> struct is_same<T, T> { static const bool value = true; };
template<bool, typename T = void> struct enable_if { };
template<typename T> struct enable_if<true, T> { using type = T; };
}

struct A {  
  template<
    typename ...T, 
    template<typename std::enable_if<
      std::is_same<T, int>::value, int
      >::type ...
    > class...
  >
  A(T...); 
}; 

A a = {1, 2.0, 3};

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]