[Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates)
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 20 03:16:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19741
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-20 02:56:03 UTC ---
We get on the trunk:
t.cc: In function ‘int main()’:
t.cc:21:33: error: no matching function for call to ‘Op<int>::Exec(int,
<unresolved overloaded function type>)’
t.cc:21:33: note: candidate is:
t.cc:13:14: note: static bool Op<T>::Exec(T, Op<T>::op_func) [with T = int;
Op<T>::op_func = bool (*)(int)]
t.cc:13:14: note: no known conversion for argument 2 from ‘<unresolved
overloaded function type>’ to ‘Op<int>::op_func {aka bool (*)(int)}’
t.cc: In instantiation of ‘static bool Op<T>::Exec(T, Op<T>::op_func) [with T =
int; Op<T>::op_func = bool (*)(int)]’:
t.cc:21:11: required from here
t.cc:15:25: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
More information about the Gcc-bugs
mailing list