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. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)