title: Access static constexpr std::array without out-of-class definition
body: <p>I have a class that defines some arrays.</p>
  
  <h2>Points.hpp</h2>
  
  <pre><code>class Points {
  
  public:
  
      static constexpr std::array&lt; double, 1 &gt; a1 = { {
              +0.0 } };
  
      static constexpr std::array&lt; double, 2 &gt; a2 = { {
              -1.0 / std::sqrt( 3.0 ),
              +1.0 / std::sqrt( 3.0 ) } };
  
  };
  </code></pre>
  
  <p>My main file then uses these arrays.</p>
  
  <h2>main.cpp</h2>
  
  <pre><code>#include "Points.hpp"
  
  int main()
  {
      // Example on how to access a point.
      auto point = Points::a2[0];
  
      // Do something with point.
  }
  </code></pre>
  
  <p>When I compile my code, using C++11 and g++ 4.8.2, I get the following linker error:</p>
  
  <pre><code>undefined reference to `Points::a2'
  </code></pre>
  
  <p>I attempted to create a Points.cpp file so that the compiler can create an object file from it.</p>
  
  <h2>Points.cpp</h2>
  
  <pre><code>#include "Points.hpp"
  </code></pre>
  
  <p>But that did not fix the linker error.</p>
  
  <p>I was under the impression that it was possible to initialize variables as static constexpr in C++11 in the class declaration, and then access them the way I'm doing it, as shown in this question: <a href="https://stackoverflow.com/a/24527701/1991500">https://stackoverflow.com/a/24527701/1991500</a></p>
  
  <p>Do I need to make a constructor for Points and then instantiate the class? What am I doing wrong?</p>
  
  <p>Any feedback is appreciated! Thanks!</p>