title: Error: array must be initialized with a brace-enclosed initializer
body: <p>I have a following piece of C++ code:</p>
  
  <pre><code>template &lt;typename WorkType, int Degree = 2&gt; class PolynomialFunction {
   public:
    static constexpr int kNumberCoefficients[] = { 0, 3, 6, 10, 15 };
    static const int kPolyDimension = kNumberCoefficients[Degree];
    ...
   private:
    WorkType polynom_[kPolyDimension];
    ...
  </code></pre>
  
  <p>which compiled fine before but suddenly (maybe new compiler) it fails with following errors:</p>
  
  <blockquote>
    <p>./polynomial_function.h: In instantiation of 'constexpr const int
    PolynomialFunction::kNumberCoefficients []':  <br/>
    ./polynomial_function.h:84:56:   required from 'const int
    PolynomialFunction::kPolyDimension'  <br/>
    ./polynomial_function.h:309:35:   required from 'class
    PolynomialFunction'    <br/> ./segment.h:321:17:   required
    from here  <br/> ./polynomial_function.h:83:24: error: initializer
    fails to determine size of 'PolynomialFunction::kNumberCoefficients'  <br/> ./polynomial_function.h:83:24: error:
    array must be initialized with a brace-enclosed initializer   <br/>
    ./polynomial_function.h: In instantiation of 'class
    PolynomialFunction':   <br/> ./segment.h:321:17: required
    from here</p>
  </blockquote>
  
  <p>Btw. line 83 is the declaration of 'kNumberCoefficients' and line 309 is the declaration of 'polynom_'. Any ideas why it is failing? Thanks.</p>