https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80771
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|wrong-code |rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed| |2017-05-16 Ever confirmed|0 |1 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- template<int> struct enable_if { using type = void; }; struct Foo { }; // This is a template function declaration, where second template argument declared without a default template <typename T, typename> void foo(const Foo &, T); // This is a template function definition; second template argument now has a default declared template <typename T, typename = typename enable_if<1>::type> void foo(const Foo &, T) { } int main() { foo(Foo{}, 1); }