This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] Should the complexity of std::list::size() be O(n) or O(1)?


Howard Hinnant wrote:

> Here is an extremely biased summary of my personal opinion on the 
> subject.  It includes a just-completed survey of how the boost 
> library is using list::size and the affected variant of list::splice 
> (motivation is to survey actual use cases as opposed to contrived 
> code).  It also includes a proposal for a new list::splice overload 
> that subsumes the functionality of the problem child and yet remains O
> (1).
>
> http://home.twcny.rr.com/hinnant/cpp_extensions/On_list_size.html

Thanks! By the way, I'm very puzzled by the words: "... snap shot of
boost, just after the release of version 1.33, on Nov. 23, 2005". Maybe
", just after the release of version 1.33" should go?

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]