[PATCH] fixing libstdc++/737: Regression with maps
Brad Garcia
bgarcia@laurelnetworks.com
Tue Nov 7 12:53:00 GMT 2000
On Tue, 7 Nov 2000, Theodore Papadopoulo wrote:
> The problem is that that patch only allowed for the comparisons
> (rb_tree::iterator,rb_tree::iterator) whereas the example above
> requires comparisons (rb_tree::const_iterator,rb_tree::iterator).
Good catch!
> I believe it is the best solution unless more such special
> cases have to be added (see PATCH below).
I think this should be the only special case. Think of iterator
comparison as being similar to pointer comparison:
You are not allowed to compare two pointers of different types.
However, you can compare const and non-const pointers of the same type.
The problem with iterators is that the "const" version is a distinct
class from the "non-const" version. Thus your special case was needed.
Brad Garcia
More information about the Libstdc++
mailing list