http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55724
--- Comment #1 from Ed Catmur <ed at catmur dot co.uk> 2012-12-17 19:25:39 UTC --- It's not entirely clear in the standard, but my understanding of 14.8.2p5 is that default template argument substitution is contemporaneous to template argument deduction for any particular parameter. Non-type template parameter types deduced from preceding arguments *are* accepted by gcc: template<int N> struct S {}; template<typename T, T N> void g(T, S<N>) {} int main() { S<1> s; g(2, s); }