title: Checking if an iterator is valid
body: <p>Is there any way to check if an iterator (whether it is from a vector, a list, a deque...) is (still) dereferenceable, i.e. has not been invalidated?</p>
  <p>I have been using <code>try</code>-<code>catch</code>, but is there a more direct way to do this?</p>
  <p>Example: (which doesn't work)</p>
  <pre><code>list&lt;int&gt; l;
  for (i = 1; i&lt;10; i++) {
      l.push_back(i * 10);
  }
  
  itd = l.begin();
  itd++;
  if (something) {
      l.erase(itd);
  }
  
  /* now, in other place.. check if it points to somewhere meaningful */
  if (itd != l.end())
  {
      //  blablabla
  }
  </code></pre>