[Bug c++/55724] [C++11] Default type of a template value is not working

ed at catmur dot co.uk gcc-bugzilla@gcc.gnu.org
Mon Dec 17 19:26:00 GMT 2012


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); }



More information about the Gcc-bugs mailing list