Re: defining a Buffer::inset_iterator which works on a const buffer

2001-10-31 Thread Andre Poenitz
On Tue, Oct 30, 2001 at 02:54:54PM +0100, Jean-Marc Lasgouttes wrote: > How shall I define it? Do I need to duplicate the > Buffer::inset_iterator class? I certainly hope not... There are many ways. I usually have a 'inset_iterator_base' template and typedef inset_iterator_baseinset_i

defining a Buffer::inset_iterator which works on a const buffer

2001-10-30 Thread Jean-Marc Lasgouttes
I am trying to define a Buffer::searchInset method which would work on a const buffer and return an iterator to the inset. My first try is: Buffer::inset_iterator Buffer::searchInset(Inset const * inset) const { inset_iterator it; inset_iterator end = inset_iterator_end();