title: Iterate std::vector without using vector.end()
body: <p>C++ rookie here. I wrote a function that returns an iterator from a vector, and I want to use this iterator to iterate through the vector from beginning to end. However, the vector iterator is used like this</p>
  
  <pre><code>for (auto iterator = vec.begin(); iterator != vec.end(); iterator ++) {
  // do something here
  }
  </code></pre>
  
  <p>which means I also need a vec.end() for this to work. Is there anyway I can only use vec.begin() to iterate through a vector, as I commonly did in python</p>
  
  <pre><code>for value in some_iterator:
  # do something
  </code></pre>
  
  <p>edit: some irrelevant update:</p>
  
  <p>I see some comments about my python iterator vs iterable. The iterator can indeed be used this way (at least in Python 3). For example:</p>
  
  <pre><code>some_list = [1,2,3,4]
  some_iterator = iter(some_list)
  for value in some_iterator:
      print(value)
  </code></pre>