Topic: Overloaded operator&


Author: rfg@netcom.com (Ronald F. Guilmette)
Date: Mon, 1 Nov 1993 05:26:35 GMT
Raw View
In article <29ucid$k0c@fnnews.fnal.gov> b91926@fnclub.fnal.gov (David Sachs) writes:
>Apparently there are language problems with overloaded operators "&" (unary) and "," (binary), because the built-in versions of these operators can accept anything. It is likely that the standards committe is considering this issue.

We can only hope.

The problem is a generic one however, and is not in any way connected
JUST with the specific operators you have mentioned.

The problem is that there are NO unambiguous rules which can be used to
determine overload resolution in cases where there exist one or more
resolutions of an expression (involving some operator) and where one
(or more) of the resolutions of the expression would cause a built-in
operator to be used while one (or more) other plausible resolutions of
the same expression causes a user-defined version of the given operator
to be used instead.

This is a serious (and known) problem.

--

-- Ronald F. Guilmette, Sunnyvale, California -------------------------------
------ domain address: rfg@netcom.com ---------------------------------------
------ uucp address: ...!uunet!netcom.com!rfg -------------------------------