shadowed rel_ops operators

amep@softhome.net amep@softhome.net
Sun Apr 1 00:00:00 GMT 2001


From: Richard Andrews <richarda@ixla.com.au>
Subject: shadowed rel_ops operators
Date: Fri, 19 Jan 2001 13:06:01 +1100

> Looking at stl_iterator.h (near end of file)
> 
> There are templated operators defined here which exactly shadow the
> operators defined in std::rel_ops.
> 
> These iterator specific operators cause havoc when using <iterator> and
> std::rel_ops in the same compilation unit.
> 
> There are only two operators in stl_iterator.h which do anything unique to
> iterators they are operator==() and operator<(), the fundamental operators.
> 
> I'd like to have the rest of the operators removed and replaced with (eg.)
> 
> using std::rel_ops::operator!=;
> 

I second that. I had some major problems with this. When the problems
are buried deep inside a library's headers it can be very hard to fix
without making the change Richard did. Which for some reason I didn't
think of doing.

I'm not a C++ wiz or anything. But, I think this is a good change to
make.

-Arthur
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA6Z6foZPQa4yHFlTARAuyyAJ4r2KoyetfnNUh7rHNVEES1WC03HgCdEsx6
ZjZk+dIBCuJCFM3rxDXqCdU=
=sj9Q
-----END PGP SIGNATURE-----


More information about the Libstdc++ mailing list