In the source code there are two classes, Point and Edge. A series of points are stored in a std::multiset. Edges are formed between the points, referenced by multiset iterators. The points are given pointers to the edge they are a part of.
In the function Edge::splitEdge, an edge is broken up by a new point. The point is added to the multiset, a new edge is created, the edge's iterators are reset, and the Edge pointers are reset. When resetting the Edge pointers, the compiler is insisting that the data contained in std::multiset<Point>::iterator is a const Point. If I change the Point member data Edge *dp_edge to mutable and make the Point::setEdge function const, the code compiles. -- Summary: Compiler forcing iterator to const Product: gcc Version: 4.2.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dont_spam_james at yahoo dot com GCC build triplet: x84_64-unknown-linux-gnu GCC host triplet: x84_64-unknown-linux-gnu GCC target triplet: x84_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41803