[Bug c++/60916] New: truncated error message
tromey at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 21 18:26:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60916
Bug ID: 60916
Summary: truncated error message
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tromey at gcc dot gnu.org
Compile this program:
int f(char *);
const char *get_something ();
template<typename T, int (*F) (const T *)>
int wrapper ()
{
return F (get_something ());
}
template<typename T1, typename T2, int (*F) (const T1 *, const T2 *)>
int wrapper ()
{
return F (get_something ());
}
int docall ()
{
return wrapper<char, f> ();
}
I get:
barimba. g++ --syntax-only t.cc
t.cc: In function ‘int docall()’:
t.cc:19:28: error: no matching function for call to ‘wrapper()’
return wrapper<char, f> ();
^
t.cc:19:28: note: candidates are:
t.cc:6:5: note: template<class T, int (* F)(const T*)> int wrapper()
int wrapper ()
^
t.cc:6:5: note: template argument deduction/substitution failed:
t.cc:19:28: error: could not convert template argument ‘f’ to ‘int (*)(const
char*)’
return wrapper<char, f> ();
^
t.cc:12:5: note: template<class T1, class T2, int (* F)(const T1*, const T2*)>
int wrapper()
int wrapper ()
^
t.cc:12:5: note: template argument deduction/substitution failed:
The trailing ":" implies to me that more is to come -- but the
messages stop here.
More information about the Gcc-bugs
mailing list