https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |nshead at gcc dot gnu.org Assignee|nathan at gcc dot gnu.org |nshead at gcc dot gnu.org --- Comment #2 from Nathaniel Shead <nshead at gcc dot gnu.org> --- Reduced: // 99274_a.H template <typename T, typename U = int> struct S; // 99274_b.H template <typename T, typename U> struct S; import "99274_a.H"; template <typename = S<int>> struct Q; g++-15 -fmodules-ts 99274_*: 99274_b.H:3:24: error: wrong number of template arguments (1, should be 2) 3 | template <typename = S<int>> struct Q; | ^~~ 99274_b.H:1:42: note: provided for ‘template<class T, class U> struct S’ 1 | template <typename T, typename U> struct S; | ^ 99274_b.H: warning: not writing module ‘./99274_b.H’ due to errors It looks like we currently don't merge default arguments for templates.