http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40793
--- Comment #16 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 12:20:51 UTC --- Thanks. Now in mainline we say this: 40793.C: In function ‘void f()’: 40793.C:5:31: error: no matching function for call to ‘staticPrint()’ 40793.C:5:31: note: candidate is: 40793.C:2:6: note: template<class T, T t> void staticPrint() 40793.C:2:6: note: template argument deduction/substitution failed: 40793.C:5:31: error: ‘double’ is not a valid type for a template constant parameter In 4.6.x we don't produce the last note and error message. What do you think?