title: Storing an boost multi_index index iterator
body: <p>I have a boost::multi_index class which has multiple indexes.</p>
  
  <p>If i want to store a normal iterator i can do</p>
  
  <p>multi_index_table::const_iterator x_itr == my_table.find(x);</p>
  
  <p>but if i try</p>
  
  <p>multi_index_table::const_iterator x_itr == my_table.get_index(y).find(x) it complains that it's not the same type of iterator.</p>
  
  <p>I'm fairly new to C++ and come from a java background, ideally i'd like some form of superclass which is able to store any type of iterator if that's possibile.</p>
  
  <p>Any guidance will be much appreciated!</p>
  
  <p>EDIT:
  I'm basically looking to do something as such:</p>
  
  <pre><code>my_table.get_index(a).find(x);
  x.erase&lt;a&gt;(x):
  
  my_table.get_index(b).find(y);
      x.erase&lt;b&gt;(y):   
  
  template&lt;uint64_t Index&gt;
  template&lt;typename Iterator&gt;  
  Iterator erase(Iterator itr){
    my_table.get_index&lt;Index&gt;().erase(itr)
  }
  </code></pre>