All versions of the STL. I realize it is probably not a good practise as right now the compiler forces you not to mess with the ordering. But table 65 of container requirements states iterator points to non-const T. There is no exception for std::set.
std::set<T>::iterator returns as const T. This can be illustrated by the following example which fails to compile on all GCC compilers. http://codepad.org/U4yYQ29j So one cannot call into objects in a set which breaches the standard. If there is no will to repair this then perhaps we could have a warning that while this is allowed in the standard it will not be supported in gcc? Thus preventing time being lost attempting to resolve this when porting from other compilers. -- Summary: Conflict with the STL standard. std::set<T>::iterator Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sleary at vavi dot co dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38304