The C++ standard said Container::size() should have constant complexity
(ISO/IEC 14882:1998, pp. 461, Table 65), while the std::list::size() in
current STL of GCC is defined as { std::distance(begin(), end()); }, whose
complexiy is O(n).
 
Is it a bug?

Reply via email to