title: how to return a null iterator in c++?
body: <p>I am writing a wrapper class which looks like this:</p>
  
  <pre><code>class Wrapper{
  private:
      std::list&lt;People&gt; men;
      std::list&lt;People&gt; woman;
  
      /**
          some bizzar logics
      **/
  public:
      std::list&lt;People&gt;::iterator getMeTheNextOne(){};
  }
  </code></pre>
  
  <p>The problem is, sometime, I need to return an empty (or NULL) iterator, saying that there is no more 'suitable' people in either list any more. If I simply return men.end() or women.end(), is the user gonna catch this?</p>
  
  <p>Imaging the user have following code:</p>
  
  <pre><code>Wrapper wo;
  std::list&lt;People&gt;::iterator it = wo.getMeTheNextPeople();
  if(it == /*what should I put here? i cannot access the list members of the Wrapper*/){
  // do something here
  }
  </code></pre>