Rope iterators (both const and mutable) do not meet the requirements of an Input Iterator, because their dereference operator only operates on non-const objects. Table 72 of the C++98 Standard requires the valid expression *a, where a is a const iterator, but this valid expression does not work with a non-const operator*. To fix, make operator* and everything it relies on "const". This might have an unfortunate ripple effect; an alternative (but ugly) approach would be to add a new operator* to _Rope_iterator and _Rope_const_iterator that const_cast's and forwards: reference operator*() const { return *const_cast<_Rope_iterator&>(*this); } reference operator*() const { return *const_cast<_Rope_const_iterator&>(*this); } This problem is very unlikely to cause problems in user code, but it makes ConceptGCC sad.
Hi Doug. I'm afraid that, everything considered - in particular the status of the rope extension - we have to go with the ugly approach: things like _Rope_iterator::_M_check() actively do change the object...
Subject: Bug 27404 Author: paolo Date: Thu May 4 09:37:56 2006 New Revision: 113519 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113519 Log: 2006-05-04 Douglas Gregor <dgregor@cs.indiana.edu> PR libstdc++/27404 * include/ext/rope (_Rope_const_iterator<>::operator*() const, _Rope_iterator<>::operator*() const): Add. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/ext/rope
Fixed.