[Bug c++/55724] [4.7/4.8 Regression] [C++11] Default type of a template value is not working
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 18 15:09:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55724
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.3
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-18 15:08:44 UTC ---
trunk now says:
t.C: In function 'int main()':
t.C:3:25: error: no matching function for call to 'f(S<1>&)'
int main() { S<1> s; f(s); }
^
t.C:3:25: note: candidate is:
t.C:2:38: note: template<class T, T N> void f(S<N>)
template<typename T = int, T N> void f(S<N>) {}
^
t.C:2:38: note: template argument deduction/substitution failed:
t.C:3:25: note: couldn't deduce template parameter 'N'
int main() { S<1> s; f(s); }
^
More information about the Gcc-bugs
mailing list