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

Jonathan Wakely cow@compsoc.man.ac.uk
Sat Nov 26 17:48:00 GMT 2005


On Fri, Nov 25, 2005 at 01:17:42PM -0500, Howard Hinnant wrote:
> On Nov 25, 2005, at 9:28 AM, Phil Edwards wrote:
> 
> >On Wed, Nov 23, 2005 at 07:42:35PM +0800, ?????? wrote:
> >>
> >>Is it a bug?
> >
> >This is a FAQ.
> 
> I could not find it here:
> 
> http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html

Good point!  It's here:
http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#6

If noone beats me to it I'll link to it from the FAQ when my copyright
assignment is sorted out.  It could be under the "things that only look
like bugs" FAQ (hint, hint, someone beat me to it ;-)

jon



More information about the Libstdc++ mailing list