title: One-line initialiser for Boost.MultiArray
body: <p>I have a n-dimensional Boost.MultiArray I initialize as follows:</p>
  
  <pre><code>const int n=3, size=4; //# of dimensions and size of one dimension
  boost::multi_array&lt;char,n&gt; arr;
  boost::array&lt;size_t,n&gt; extents; //size of each dimension
  extents.assign(size); //assign size to each dimension -&gt; {{4, 4, 4}}
  arr.resize(extents);
  </code></pre>
  
  <p>So I have 4 lines of code to get the MultiArray, but I'd like to do it in one line.
  Is there any simple way to generate an MultiArray with n dimensions each having <code>size</code> length (so I can write <code>arr(samevaluearray(n,size))</code>) or did I miss a handy constructor for MultiArray?</p>
  
  <p><b>Edit:</b> It should work without depending on a certain value of n, i.e. <code>arr({{size,size}}</code> would only work for <code>n=2</code>.</p>
  
  <p>Since it may not be clear: <code>boost::multi_array&lt;char,n&gt;(boost::extents[4][4][4])</code> correctly initializes a 4x4x4-array, but every time <code>n</code> is changed in the sourcecode, every initialization has to be updated by hand, so it's not an option.</p>