The following implicit conversion sequence rankings situations are unsupported at this time.
- When s1 and s2 are distinct standard conversion sequences and s1 is a sub-sequence of s2, overload resolution prefers s1 to s2. Example:
Listing: Example - Implicit conversion sequence
int f0(const char*) { return 0; }
int f0(char*) { return 1; }
value = f0('a');
---------------^----------------ERROR:Ambiguous
- When s1 and s2 are distinct standard conversion sequences of the same rank, neither of which is a sub-sequence of the other, and when s1 converts c* to b* (where b is a base of class c), while s2 converts c* to a* (where a is a base of class b), then overload resolution prefers s1 to s2. Example:
Listing: Example 2 - Implicit conversion sequence
struct a
struct b : public a
struct c : public b
int f0(a*) { return 0; }
int f0(b*) { return 1; }
c* cp;
value = f0(cp);
--------------^----------------ERROR:Ambiguous
- When s1 and s2 are distinct standard conversion sequences neither of which is a sub-sequence of the other, and when s1 has Promotion rank, and s2 has Conversion rank, then overload resolution prefers s1 to s2. Example:
Listing: Example 3 - Implicit conversion sequence
int f(int) { return 11; }
int f(long) { return 55; }
short aa = 1;
int i = f(aa)
----------^------------------- ERROR:Ambiguous