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


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

stl set<T>::iterator == const_iterator?


Dear gcc developers,

It seems that in the g++ standard C++ library the
STL set<>::iterator is equal to set<>::const_iterator.
I checked versions egcs-2.91.66, gcc-2.95.2, and gcc-3.00.

This means that I can not call any non-const member functions
of objects in a set<> using iterators.

The strange thing is that in STL map<> a normal non-const iterator
IS defined, and both set<> and map<> use the shared rb_tree
implementation.

Is there a special reason for this 'feature', or is this a bug?
It seems to me that it is very easy to fix.

Best regards,
Martin Woudstra.


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