This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55724] [4.7/4.8 Regression] [C++11] Default type of a template value is not working
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Dec 2012 15:08:44 +0000
- Subject: [Bug c++/55724] [4.7/4.8 Regression] [C++11] Default type of a template value is not working
- Auto-submitted: auto-generated
- References: <bug-55724-4@http.gcc.gnu.org/bugzilla/>
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); }
^