How to divide a tuple in C++ : <p>I have a question about dividing a tuple, as the title said.</p>

<p>In fact, I can do it using <code>std::index_sequence</code>, but the code looks ugly.</p>

<p>Is there an elegant way of accomplishing this?</p>

<p>Here are some code to show what I mean.</p>

<pre><code>#include&lt;tuple&gt;
using namespace std;

template&lt;typename THead, typename ...TTails&gt;
void foo(tuple&lt;THead, TTails...&gt; tpl)
{
    tuple&lt;THead&gt; tpl_h { get&lt;0&gt;(tpl) };
    tuple&lt;TTails...&gt; tpl_t { /* an elegent way? */ }
    do_sth(tpl_h, tpl_t);
}

int main()
{
    foo(make_tuple(1, 2.0f, 'c'));
    return 0;
}
</code></pre>
