mirror of git://gcc.gnu.org/git/gcc.git
pt.c (determine_specialization): Print candidates after 'no match' error.
* pt.c (determine_specialization): Print candidates after 'no match' error. From-SVN: r226653
This commit is contained in:
parent
a2b4cfaa89
commit
f31d0b122f
|
|
@ -1,5 +1,8 @@
|
|||
2015-08-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* pt.c (determine_specialization): Print candidates after 'no
|
||||
match' error.
|
||||
|
||||
* decl.c (cp_finish_decl): Tidy.
|
||||
* typeck.c (finish_class_member_access_expr): Use
|
||||
type_dependent_expression_p.
|
||||
|
|
|
|||
|
|
@ -1952,6 +1952,8 @@ determine_specialization (tree template_id,
|
|||
b = b->level_chain)
|
||||
++header_count;
|
||||
|
||||
tree orig_fns = fns;
|
||||
|
||||
if (variable_template_p (fns))
|
||||
{
|
||||
tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (fns));
|
||||
|
|
@ -2168,6 +2170,8 @@ determine_specialization (tree template_id,
|
|||
inform (input_location, "saw %d %<template<>%>, need %d for "
|
||||
"specializing a member function template",
|
||||
header_count, template_count + 1);
|
||||
else
|
||||
print_candidates (orig_fns);
|
||||
return error_mark_node;
|
||||
}
|
||||
else if ((templates && TREE_CHAIN (templates))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
template <class T> void f(T); // { dg-message "void f" }
|
||||
template <> int f(int); // { dg-error "does not match" }
|
||||
|
||||
Loading…
Reference in New Issue