* pt.c (determine_specialization): Print candidates after 'no
match' error.
From-SVN: r226653
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.
b = b->level_chain)
++header_count;
+ tree orig_fns = fns;
+
if (variable_template_p (fns))
{
tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (fns));
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))
--- /dev/null
+template <class T> void f(T); // { dg-message "void f" }
+template <> int f(int); // { dg-error "does not match" }
+