Hi,
Consider this program:
struct Thing {
operator void* () const;
};
struct any {
template<class T>
any(T const&);
};
char operator*(any const&);
int main()
{
Thing t;
*t;
}
This compiles on VC7.1, GCC 3.4 and como 4.3.3. I'm interested to know
the
result when compiled on CW 9.4, which I don;t have access to. Based on the
Boost
regression reports here, http://tinyurl.com/5wtud,
I am guessing the
compiler
will complain of an ambiguity between 'void operator*(any const&)' and
'operator* (void *)'.
I'm puzzled by this reference to 'operator* (void*)'. Since a void pointer
cannot be dereferenced, why should this dereferncing operation be
considered
during overload resolution?
Best Regards,
Jonathan


|