TITLE: operator and const operator ambiguity PROBLEM: Michael Cook Does the standards committee consider this code ambiguous: struct X; struct Y { operator X*(); operator const X*() const; }; void* f(Y y) { return y; //10 } A couple compilers (different vendors) say it /is/ ambiguous, but I can't see why. RESPONSE: clamage@Eng.Sun.COM (Steve Clamage), 16 Jan 96 The ARM (and early versions of the C++ draft standard) said that any data pointer type could be converted implicitly to void*. Under that rule, the code is ambiguous. That rule also allows silent loss of the const qualifier, which is wrong. The rule was changed so that there is no implicit conversion to void* from a cv-qualified pointer. Under the new rule, the code is not ambiguous, and the conversion to X* would be selected.