Andre Poenitz <[EMAIL PROTECTED]> writes: | On Thu, Aug 15, 2002 at 09:33:23AM +0200, Andre' Poenitz wrote: | > > Actually I like it solved by either: | > > | > > Paragraph * p = &*boost::prior(paragraphs.end()); | > > (the ParagraphList::iterator for end is too dumb for this) | > > or | > > | > > Paragraph * p = ¶graphs.back(); | > > (easy to add, but will be O(n) until we move to a real STL | > > container) | > | > Why? It's guranteed O(1) for std::list | | Sorry. I missed the "until". | | What about having a paragraphs.back() method then, that does the | boost call _now_ and uses the std::list::back later? This way you do | not have to touch "user code" again.
Yes, I will add front and back functions to ParagraphList. -- Lgb