PR libstdc++/27404
* include/ext/rope (_Rope_const_iterator<>::operator*() const,
_Rope_iterator<>::operator*() const): Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113519
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
+
2006-05-01 Paolo Carlini <pcarlini@suse.de>
* acinclude.m4 (GLIBCXX_ENABLE_WCHAR_T): Always check the
_S_setcache(*this);
return *this->_M_buf_ptr;
}
-
+
+ // Without this const version, Rope iterators do not meet the
+ // requirements of an Input Iterator.
+ reference
+ operator*() const
+ {
+ return *const_cast<_Rope_const_iterator&>(*this);
+ }
+
_Rope_const_iterator&
operator++()
{
*this->_M_buf_ptr);
}
+ // See above comment.
+ reference
+ operator*() const
+ {
+ return *const_cast<_Rope_iterator&>(*this);
+ }
+
_Rope_iterator&
operator++()
{