Commit 49525c76 by Douglas Gregor Committed by Paolo Carlini

re PR libstdc++/27404 (Rope iterators are not InputIterators)

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.

From-SVN: r113519
parent 8cd37d0b
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
......
......@@ -1153,7 +1153,15 @@ protected:
_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++()
{
......@@ -1336,6 +1344,13 @@ protected:
*this->_M_buf_ptr);
}
// See above comment.
reference
operator*() const
{
return *const_cast<_Rope_iterator&>(*this);
}
_Rope_iterator&
operator++()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment