[iterator_adaptor] Does the base need a const version of operator* ?

Hi,
I am trying to wrap our kind of iterators (for meshes) with the
iterator_adaptor class template, something like
class CellBoostIterator
: public boost::iterator_adaptor<
CellBoostIterator //Derived
, CellIterator //Base
, Cell //Value
, boost::forward_traversal_tag // CategoryOrTraversal
>
{
...
};
Since the base class CellIterator already provides a operator* and a
operator-> (both non-const version) I did not redefine any of these
within the CellBoostIterator class.
If I now want to use with code-snippet
typedef Mesh_2::CellBoostIterator MIT;
MIT mit;
Mesh_2 mesh_2(omega1);
for (MIT mit = mesh_2.begin(); mit != mesh_2.end(); ++mit)
{
std::cout << mit->index() <
participants (1)
-
Andre Massing