title: How to efficiently insert a range of consecutive integers into a std::set?
body: <p>In C++, I have a std::set that I would like to insert a range of consecutive integers.  How can I do this efficiently, hopefully in O(n) time where n is the length of the range?</p>
  
  <p>I'm thinking I'd use the inputIterator version of std::insert, but am unclear on how to build the input iterator.</p>
  
  <pre><code>std::set&lt;int&gt; mySet;
  
  // Insert [34 - 75):
  mySet.insert(inputIteratorTo34, inputIteratorTo75);
  </code></pre>
  
  <p>How can I create the input iterator and will this be O(n) on the range size?</p>