title: When do you prefer using std::list<T> instead of std::vector<T>?
body: <p>I've never used <code>std::list&lt;T&gt;</code> myself. I was wondering when people use it when we already have <code>std::vector&lt;T&gt;</code> which is just like arrays with contiguous memory. <code>std::vector</code> seems like a perfect choice when we need sequential container!</p>
  
  <p>So my question is</p>
  
  <ul>
  <li>When exactly do you <em>prefer</em> <code>std::list</code> over <code>std::vector</code>? and why exactly? </li>
  <li>When do you <em>prefer</em> <code>std::vector</code> over <code>std::list</code>? and why?</li>
  </ul>
  
  <p>If there is performance consideration, then please list them too with detail explanation/information. </p>
  
  <p><strong>If possible, quote some references also, to support your answer.</strong></p>