title: Custom input iterator
body: <p>I have a custom read-only data structure that I need to transverse. I would like to create a custom iterator that need to skip certain values.</p>
  
  <p>A simple but equivalent example would be the following. I have a vector of numbers and I want to loop through all skipping the negative values. Normally I would do something like:</p>
  
  <pre><code>vector&lt;int&gt; v;
  for (vector&lt;int&gt;::iterator it = v.begin(); it!=v.end(); ++it) {
      if (*it &gt; 0) {
         dosomething(*it);
      }
  }
  </code></pre>
  
  <p>But I would like to do something like:</p>
  
  <pre><code>vector&lt;int&gt; v;
  for (vector&lt;int&gt;::my_iterator it = v.my_begin(); it!=v.my_end(); ++it) {
      dosomething(*it);
  }
  </code></pre>
  
  <p>What is the right way to achieve this?</p>