title: Manipulating std::array in a function
body: <p>I have a multidimensional array of fixed size in my code, and I need to be able to change the values within it in a separate function. I want to know, are std::arrays passed as references in a method or is a copy made? So can I do this:</p>
  
  <pre><code>using std::array;
  
  void foo (array&lt;array&lt;int,WIDTH&gt;,HEIGHT&gt; bar);
  //manipulates the values in the array
  ...
  
  int main() {
    array&lt;array&lt;int,WIDTH&gt;,HEIGHT&gt; baz;
    ...
    foo(baz);
    //baz is changed
  }
  </code></pre>
  
  <p>Or do I need to explicitly turn it into a reference? I fear that if I created an array function that returned a copy, it would be too messy and not as fast.</p>