title: C++ operating on "packed" arrays
body: <p>Suppose that I have two, for example, <code>float</code> arrays <code>a</code> and <code>b</code>, an <code>int</code> key array <code>k</code> and a template <code>mySortByKey</code> function of my own, operating on a single array, something like</p>
  
  <pre><code>template&lt;class T&gt;
  mySortByKey(int *k, T *a)
  </code></pre>
  
  <p>Is there a possibility (for example, using zip iterators and tuples of some sorts) to enable <code>mySort</code> operating simultaneously on <code>a</code> and <code>b</code>, so that they can be simultaneously ordered according to the key <code>k</code>?</p>