title: Large POD as tuple for sorting
body: <p>I have a POD with about 30 members of various types and I will be wanting to store thousands of the PODs in a container, and then sort that container by one of those members.</p>
  
  <p>For example:</p>
  
  <pre><code> struct Person{
     int idNumber;
     ....many other members
   }
  </code></pre>
  
  <p>Thousands of <code>Person</code> objects which I want to sort by <code>idNumber</code> or by any other member I choose to sort by.</p>
  
  <p>I've been researching this for a while today and it seems the most efficient, or at least, simplest, solution to this is not use <code>struct</code> at all, and rather use <code>tuple</code> for which I can pass an index number to a custom comparison functor for use in <code>std::sort</code>. (An example on <a href="http://www.gamedev.net/topic/275617-stl-stdmap-and-sorting-using-value_compare/" rel="nofollow">this page</a> shows one way to implement this type of sort easily, but does so on a single member of a <code>struct</code> which would make templating this not so easy since you must refer to the member by name, rather than by index which the <code>tuple</code> provides.)</p>
  
  <p>My two-part question on this approach is 1) Is it acceptable for a tuple to be fairly large, with dozens of members? and 2) Is there an equally elegant solution for continuing to use <code>struct</code> instead of <code>tuple</code> for this?</p>