This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rel_ops (was Re: GCC 3.1 Release)


On Wed, Apr 17, 2002 at 08:52:50PM +0200, Richard B. Kreckel wrote:
> Could someone please
> enlighten me and provide a scenario where the operators in std::rel_ops
> take precendence over operators that would have been selected otherwise.

The problem is not that they take precendence /over/ other operators, it's
that they don't allow other operators to take precedence over themselves.
They become equal candidates.  Then the compiler pukes out due to the
ambiguity.  (To see this, use the rel_ops operators with vector or string
iterators, /without/ the recently applied patch.)

At least, that seems to be the problem.  Gaby?


In a perfect world (or at least in mine *grin*), we could tell the compiler
that, in the case of ambiguous matches, check to see if one of the functions
is in the std::rel_ops namespace, and if so, temporarily discard that one,
and see if the ambiguity remains.  (Blue-sky idea, probably flaky.)


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]