https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119047
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Without the library header:
namespace std {
template<bool, typename> struct enable_if { };
template<typename T> struct enable_if<true, T> { using type = T; };
}
template<int N, int M, int Z> struct Tmpl {
int f() { return 0; }
};
template<int N,
typename std::enable_if<N % 2 == 0, int>::type M>
struct Tmpl<N, M, 0> {
int f() { return 1; }
};
int main(void) {
return Tmpl<6, 6, 0>().f();
}
Clang, MSVC and EDG accept the program.
It was an error until r12-8256-g288e4c64f6b480 (PR105289) which changed it from
permerror to pedwarn.