title: What are the differences between std::strtol and std::stoi?
body: <p><em>Disclaimer: Links are to cppreference.com</em></p>
  
  <p>So I have known for a while that <a href="http://en.cppreference.com/w/cpp/string/byte/atoi" rel="noreferrer">std::atoi</a> has been deprecated and it's been recommended to use <a href="http://en.cppreference.com/w/cpp/string/byte/strtol" rel="noreferrer">std::strtol</a> instead. </p>
  
  <p>C++11 has introduced <a href="http://en.cppreference.com/w/cpp/string/basic_string/stol" rel="noreferrer">std::stoi</a> and I'm trying to understand why one would choose to use it over <code>std::strtol</code>.</p>
  
  <p>From what I understand is that stoi calls strtol but throws exceptions.  Also it returns an integer instead of a long.  </p>
  
  <p><strong>Are these the main differences, what am I missing?</strong></p>