shadowed rel_ops operators
Nathan Myers
ncm@nospam.cantrip.org
Sun Jan 21 11:12:00 GMT 2001
On Sat, Jan 20, 2001 at 05:50:35PM -0600, amep@softhome.net wrote:
> From: Nathan Myers <ncm@nospam.cantrip.org>
> >
> > The rel_ops operators are not useful. They were a mistake. If you
> > insist on using them, you will have trouble. Nobody will care, because
> > you asked for it.
>
> 1) I noticed that some of the backwards compatibility .h's bring these
> operators into std::. This makes it so you can't use libraries that
> include these headers along with code that uses the new features of
> libstdc++-v3. Is there a way around this? It seems to me that in most
> cases all the backwards compatibility. you need is mapping iterator.h
> to iterator, ... . Maybe there should be a #define that turns off all
> the extra backwards compatibility stuff. Just a thought. And maybe a
> bad one.
The backward-compatibility stuff has languished. Yes, it would be
good to make it play better with the standard stuff, to make an
easier transition. Can you send patches?
> 2) It seems to me that rel_ops is a very good idea that went wrong
> somehow. Is there anything that replaces them in anyway? It seems to
> me they could be very useful if they where designed so they could be
> confined easily.
The rel_ops operators are a good idea for some language other than C++.
To my knowledge, nobody has been able to make them work right given the
rules for template overloading in C++. The good news is that they would
only have been a notational convenience, and we can live without them.
Nathan Myers
ncm at cantrip dot org
More information about the Libstdc++
mailing list