+2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
+
+ * call.c (joust): Ensure more_specialized()'s argument length
+ parameter has correct value for constructors.
+
2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
* except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
winner = more_specialized
(TI_TEMPLATE (cand1->template), TI_TEMPLATE (cand2->template),
DEDUCE_ORDER,
- /* Tell the deduction code how many real function arguments we saw,
- not counting the implicit 'this' argument.
+ /* Tell the deduction code how many real function arguments
+ we saw, not counting the implicit 'this' argument. But,
+ add_function_candidate() suppresses the "this" argument
+ for constructors.
[temp.func.order]: The presence of unused ellipsis and default
arguments has no effect on the partial ordering of function
templates. */
TREE_VEC_LENGTH (cand1->convs)
- - DECL_NONSTATIC_MEMBER_FUNCTION_P (cand1->fn));
+ - (DECL_NONSTATIC_MEMBER_FUNCTION_P (cand1->fn)
+ - DECL_CONSTRUCTOR_P (cand1->fn)));
+ /* HERE */
if (winner)
return winner;
}