This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
stl set<T>::iterator == const_iterator?
- To: gcc at gcc dot gnu dot org
- Subject: stl set<T>::iterator == const_iterator?
- From: Martin Woudstra <Martin dot Woudstra at cern dot ch>
- Date: Wed, 18 Jul 2001 14:06:25 +0200
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.