title: Initializing an array with a constexpr?
body: <p>I wonder if it is possible to initialize an entire array with a constexpr function (with C++ 2011).
  Here I have something to illustrate what I want to do :</p>
  
  <pre><code>template&lt;unsigned int DIM&gt; const unsigned int MyClass&lt;DIM&gt;::_myVar[2][3] = {
  {metaFunction(0, 0, DIM), metaFunction(0, 1, DIM), metaFunction(0, 2, DIM)}, 
  {metaFunction(1, 0, DIM), metaFunction(1, 1, DIM), metaFunction(1, 2, DIM)}
  };
  
  template&lt;unsigned int DIM&gt; inline constexpr unsigned int MyClass&lt;DIM&gt;::metaFunction(const unsigned int k, const unsigned int n, const unsigned int dim)
  {
      return (((n &lt; dim) &amp;&amp; (k &lt; n)) ? (1&lt;&lt;(n-k)) : (0));
  }
  </code></pre>
  
  <p>Is there a way to initialize myVar with a constexpr without filling the array manually. And if it exists, what would be the syntax for the given example ?</p>
  
  <p>To precise the question a little, I search for a way to fill all values of myVar using a single function call.</p>