Changing overload rules to match C++ behavior: Emit a warning when the best overload match has some number of no-best matching parameters.

This commit is contained in:
Ilia Filippov
2014-03-24 16:20:23 +04:00
parent 6f44d5b55f
commit ecdc695b22
14 changed files with 59 additions and 27 deletions

View File

@@ -2935,7 +2935,9 @@ of a function, ``ispc`` uses the following model to choose the best function:
each conversion of two types has its cost. ``ispc`` tries to find conversion
with the smallest cost. When ``ispc`` can't find any conversion it means that
this function is not suitable. Then ``ispc`` sums costs for all arguments and
chooses the function with the smallest final cost.
chooses the function with the smallest final cost. If the chosen function
has some arguments which costs are bigger than their costs in other function
this treats as ambiguous.
Costs of type conversions placed from small to big:
1. Parameter types match exactly.