Substitute [] by std::array
<p>Is there a way to substitute <code>VECTOR_TYPE::*memberlist[sizeof...(SCALAR)]</code> by <code>std::array&lt; ??? &gt;</code>?</p>

<pre><code>struct myVec
{
    double x;
    double y;
};

template &lt; typename VECTOR_TYPE, typename SCALAR_TYPE, SCALAR_TYPE VECTOR_TYPE::*...SCALAR &gt;
struct vector_template : VECTOR_TYPE
{
    SCALAR_TYPE &amp; operator[]( size_t inx )
    {
        constexpr SCALAR_TYPE VECTOR_TYPE::*memberlist[sizeof...(SCALAR)]{ SCALAR... };
        return this-&gt;*(memberlist[inx]);
    }
};

int main()
{
    vector_template &lt; myVec, double, &amp;myVec::x, &amp;myVec::y &gt; vec;

    vec[0] = 0.0;
    vec[1] = 0.0;

    return 0;
}
</code></pre>