This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: rel_ops (was Re: GCC 3.1 Release)
- From: Phil Edwards <phil at jaj dot com>
- To: Richard dot Kreckel at Uni-Mainz dot DE
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, Joe Buck <Joe dot Buck at synopsys dot com>, Mark Mitchell <mark at codesourcery dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "bkoz at redhat dot com" <bkoz at redhat dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, Christian Bauer <Christian dot Bauer at Uni-Mainz dot DE>
- Date: Wed, 17 Apr 2002 15:13:20 -0400
- Subject: Re: rel_ops (was Re: GCC 3.1 Release)
- References: <flwuv7iljq.fsf@jambon.cmla.ens-cachan.fr> <Pine.LNX.4.21.0204172043020.1278-100000@higgs.physik.uni-mainz.de>
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