C++/CLI std::array has changed since VS2010?
<p>I have a working VS2010 solution that has a C# program passing an array to a C++ DLL using this syntax:</p>

<p>In the C++ file:</p>

<pre><code>void MyClass::MyFunction( array&lt; Byte &gt;^% byteArray, unsigned int size )
</code></pre>

<p>Where the first parameter is a pointer to the array and the second is the number of elements in it.</p>

<p>In the C# file I call this function like so:</p>

<pre><code>MyClass myClass = new MyClass();
byte[] bArray = new byte[8];
myClass.MyFunction(ref bArray, 8)
</code></pre>

<p>This all works.  But I am now trying to port the code to a VS2015 solution and the C++ code is failing to compile.</p>

<p>In the C++ project VS puts a red squiggle under the trailing <code>&gt;</code> in the function definition, and the message seems to be <code>too few arguments for class template "std::array"</code></p>

<p>My guess is that either the std::array template definition changed between VS2010 and VS2015, or the compiler itself changed (and is now more strict)</p>

<p><a href="https://stackoverflow.com/questions/30395498/error-with-stdarray-and-vs2015">This question</a> seems to back up my guess and points that the <code>std::array</code> needs an additional size parameter.  However I am trying to pass in an array of an arbitrary size.</p>

<p>So my question is: can I achieve the same functionality in VS2015? If so, how?</p>