http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49561
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-28 08:47:47 UTC --- (In reply to comment #0) > I realized that the complexity of std::list::size() is O(n), not O(1). > > This does not conform to standard. The standard states that size() function is > in constant time for alls containers. No, the current standard does not. The C++0x draft does, but it's not yet a standard, and parts of it are not yet implemented.