title: How to check whether STL iterator points at anything?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2062956/c-best-way-to-check-if-an-iterator-is-valid">C++ Best way to check if an iterator is valid</a>  </p>
  </blockquote>
  
  
  
  <p>I want to do something like this: </p>
  
  <pre><code>std::vector&lt;int&gt;::iterator it;
  // /cut/ search for something in vector and point iterator at it. 
  if(!it) //check whether found
      do_something(); 
  </code></pre>
  
  <p>But there is no operator! for iterators. How can I check whether iterator points at anything? </p>