[over.ics.rank] (original) (raw)

12 Overloading [over]

12.2 Overload resolution [over.match]

12.2.4 Best viable function [over.match.best]

12.2.4.3 Ranking implicit conversion sequences [over.ics.rank]

This subclause defines a partial ordering of implicit conversion sequences based on the relationshipsbetter conversion sequenceandbetter conversion.

If an implicit conversion sequence S1 is defined by these rules to be a better conversion sequence than S2, then it is also the case that S2 is aworse conversion sequencethan S1.

If conversion sequence S1 is neither better than nor worse than conversion sequence S2, S1 and S2 are said to beindistinguishable conversion sequences.

Two implicit conversion sequences of the same form are indistinguishable conversion sequences unless one of the following rules applies:

Standard conversion sequences are ordered by their ranks: an Exact Match is a better conversion than a Promotion, which is a better conversion than a Conversion.

Two conversion sequences with the same rank are indistinguishable unless one of the following rules applies: