Am Dienstag, 8. November 2005 11:46 schrieb Martin Vermeer: > On Tue, Nov 08, 2005 at 09:56:11AM +0100, Jean-Marc Lasgouttes wrote: > > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > Martin> Attached. > > > > It look good, except that I am surprised that > > + pit_type pit = pars_.size(); > > + for (pit_type it = 0; it < pars_.size(); ++it) { > > + if (&pars_[it] == &par) > > + pit = it;
Why no break here? > > + } > > cannot be replaced by something like > > pit = pars_.find(par); > > I tried that, and got > > text2.C:198: error: 'const class ParagraphList' has no member named > 'find' ParagraphList::iterator it = std::find(pars_.begin(), pars_.end(), par); would work if we wanted to compare the whole paragraph and not the address and an operator==(Paragraph const &, Paragraph const &) existed. The patch works fine for me. Georg