Marius Bancila wrote: | |
And what exactly does the paragraph say
|
|
13.3.3.2 is "Ranking implicit conversion sequences".
To use MyArray::operator[](int), the standard conversion subclause 4.7 (Integral Conversion) is used for the unsigned -> signed conv.
MyArray::operator const Type*, however, is a user defined conversion, and 13.3.3.2 - 2 defines that this should be ranked lower than the standard conversion.
Even the compile error puzzles me in this case. "'MyArray<Type>::operator []' : 2 overloads have similar conversions" makes it sound like there are actually two or more subscript operators with similar conversions.
|