C++: Can std::tuple_size/tuple_element be specialized? : <p>Is specialization of <code>std::tuple_size</code> and <code>std::tuple_element</code> permitted for custom types?
I suppose it is, but I want to be absolutely sure, and I can't find any concrete information.</p>

<p>Example (namespaces, member functions and <code>get&lt;I&gt;</code> overloads omitted):</p>

<pre><code>template &lt;typename T, size_t N&gt;
struct vector { T _data[N]; };

template&lt;size_t I, typename T, size_t N&gt;
constexpr T&amp; get(vector&lt;T,N&gt;&amp; vec) { return vec._data[I]; }

namespace std {
template&lt;typename T, size_t N&gt;
class tuple_size&lt; vector&lt;T,N&gt; &gt; : public std::integral_constant&lt;size_t, N&gt; { };
template&lt;size_t I, typename T, size_t N&gt;
class tuple_element&lt; I, vector&lt;T,N&gt; &gt; { public: using type = T; };
}
</code></pre>

<p>I need that for use with structured bindings:</p>

<pre><code>void f(vector&lt;T,3&gt; const&amp; vec)
{
    auto&amp; [x,y,z] = vec;
    // stuff...
}
</code></pre>
