Partial ordering bug (?) in egcs

Jason Merrill jason@cygnus.com
Tue Aug 11 11:43:00 GMT 1998


>>>>> Thomas Kunert <kunert@physik.tu-dresden.de> writes:

> Unfortunately I don't have a copy of the FDIS, but the Nov. 97 WP says
> in 14.5.5.2 [temp.func.order]:

> 3 Using the transformed function parameter list, perform argument deduc-
>   tion against the other function template.  The transformed template is
>   at least as specialized as the other if, and only  if,  the  deduction
>   succeeds  and  the  deduced parameter types are an exact match (so the
>   deduction does not rely on implicit conversions).

> `const T2&' is not supposed to be the the "same as" but an "exact match"
> for `IndexPlaceholder<N_index>'.  In the example above you can choose an
> appropriate T2.  Hence I think #2 is more specialized than #1.

Granting this point for the sake of argument, it still depends on the
deduction succeeding.  There is no way to deduce T2 in this case, since
"const T2&" is a reference type and "IndexPlaceholder<N_index>" is not.

Jason




More information about the Gcc-bugs mailing list