All pastes #477723 Raw Edit

sortkatt

public text v1 · immutable
·published 2007-05-08 20:33 UTC
rendered paste body
• Some implementations of std::list<T>::size() have linear complexity
rather than constant complexity. This latitude is allowed by the Standard
container requirements specified in §IS-23.1. Calling such a function inside a loop
would result in quadratic behavior. For the same reason it is better to use
constructs such as if(myList.empty()) rather than if(MyList.size()==0).