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


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

Re: rel_ops issues



> | Please understand: libstdc++-v3 is not releasable until this problem is
> | solved.  I and others have lots of code that requires use of the rel_ops
> | and that uses the STL; such code compiles with aCC, Sun C++, MSVC, etc,
> | etc.  It's not acceptable to blame the spec when it is a simply fixed bug.
> 
> I'm not arguing to release V3 as is.  But I'm certainly opposed to
> deadly wrong solutions.

No one has proposed a "deadly wrong solution".  I've pointed out that the
first problem (conflicting definitions for != ) can be solved by a partial
specialization of operator!= and friends for __normal_iterator, and have
given two alternatives for the second problem (some STL algorithms not
working on classes that have operator== but not operator!=).

The first alternative:

	using std::rel_ops::operator!=;

is not deadly wrong if done properly.  I never said to do it at file scope
(this would not be valid since the user did not request it), but rather
WITHIN the functions where it is needed.  This cannot have any "deadly
wrong" effect.  Nevertheless, if it makes you nervous, the alternative of
rewriting the != operators into ! and == will do the trick as well.




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