Replicating C++/CLI multidimensional array template class in standard C++
<p>In C++/CLI, you can specify the following for multidimensional arrays.</p>

<pre><code>array&lt;int, 2&gt;^ Foo = gcnew array&lt;int, 2&gt;(10);
Foo[0, 0] = 1;
Foo[1, 0] = 2;
// ...
</code></pre>

<p>I'm trying to replicate the above in the closest syntax possible in standard C++ (C++11 is allowed) via a templated class called my_array.</p>

<p>e.g.</p>

<pre><code>template &lt;typename T, int rank = 1&gt;
    class my_array { };
</code></pre>

<p>Is it possible via some comma operator overloading tricks to achieve C++/CLI's syntax under standard C++, along with overriding my_array's subscript operator?</p>

<p>Ideally, I'd like the my_array used this way (equivalent to the above example):</p>

<pre><code>my_array&lt;int, 2&gt; Foo = // ... (ignore this part - already implemented)
Foo[0, 0] = 1;
Foo[1, 0] = 2;
// ...
</code></pre>

<p>In case anyone's wondering, I'm creating a C++/CLI equivalent for GCC and currently the framework does not support multidimensional arrays. I'm looking to add that functionality in the closest possible way syntax wise to C++/CLI.</p>
