title: How to split a tuple?
body: <p>Given a </p>
  
  <pre><code>   template&lt;typename First, typename... Tail&gt;
     struct something
     {
         std::tuple&lt;First, Tail...&gt; t;
     };
  </code></pre>
  
  <p>How can I get a <code>std::tuple&lt;Tail...&gt;</code> that contains all elements from <code>t</code> except for the first one? </p>
  
  <hr>
  
  <p>I think this is an interesting question in general, but here is my motivation for context:</p>
  
  <p>I'd like to implement a hash for tuples. I used <a href="https://stackoverflow.com/a/7111460/140367">this answer</a> as a basis. I found that there was an error in it, namely not calling <code>operator()</code> of the hash object with a value:</p>
  
  <pre><code>return left() ^ right();
  </code></pre>
  
  <p>Should be:</p>
  
  <pre><code>return left(std::get&lt;0&gt;(e)) ^ right(???);
  </code></pre>
  
  <p>The ??? would be the remaining elements of the tuple to continue the recursive instantiation of the template. Here is the complete code including the termination part:</p>
  
  <pre><code>#include &lt;functional&gt;
  #include &lt;utility&gt;
  
  namespace std
  {
  
  template&lt;typename First, typename... Tail&gt;
  struct hash&lt;std::tuple&lt;First, Tail...&gt;&gt;
  {
      typedef size_t result_type;
      typedef std::tuple&lt;First, Tail...&gt; argument_type;
  
      result_type operator()(argument_type const&amp; e) const
      {
          std::hash&lt;First&gt; left;
          std::hash&lt;std::tuple&lt;Tail...&gt;&gt; right;
          return left(std::get&lt;0&gt;(e)) ^ right(???);
      }
  };
  
  template&lt;&gt;
  struct hash&lt;std::tuple&lt;&gt;&gt;
  {
      typedef size_t result_type;
      typedef std::tuple&lt;&gt; argument_type;
  
      result_type operator()(argument_type const&amp; e) const
      {
          return 1;
      }
  };
  
  }
  </code></pre>