(j3.2006) operator(==) and operator(/=)
Van Snyder
Van.Snyder
Wed Apr 13 15:23:16 EDT 2016
I was a bit surprised to discover that (apparently) defining
operator(==) does not define operator(/=), and that a scoping unit is
not prohibited from having access to both.
Was there a conscious reason we did not (indirectly) require
( A == B ) .eqv. ( .not. ( A /= B ) )
by specifying that only a definition of operator(==) or operator(/=) can
be accessible in a scoping unit, and the other one is automatically
defined?
Or was this just an oversight?
It's too late to change it now, but I'm still curious whether there was
a thought process involved.
One might argue that also
( A <= B ) .eqv. ( .not. ( A > B ) )
etc., but perhaps that's too much thinking to do before breakfast.
One might argue that 7.1.5.4.2p1 (in 10-007r2) gives license to replace
( A == B ) with ( .not. ( A /= B ) ), and 7.1.5.5.2 gives license to
replace ( A <= B ) with ( .not. ( A > B ) ).
So is it really necessary for a scoping unit to have access to both
operator(==) and operator(/=)?
More information about the J3
mailing list