This is the mail archive of the
mailing list for the libstdc++ project.
Re: shadowed rel_ops operators
On Sat, Jan 20, 2001 at 05:50:35PM -0600, firstname.lastname@example.org wrote:
> From: Nathan Myers <email@example.com>
> > 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.
ncm at cantrip dot org