title: Undefined reference to static constexpr char[]
body: <p>I want to have a <code>static const</code> <code>char</code> array in my class. GCC complained and told me I should use <code>constexpr</code>, although now it's telling me it's an undefined reference. If I make the array a non-member then it compiles. What is going on?</p>
  
  <pre><code>// .hpp
  struct foo {
    void bar();
    static constexpr char baz[] = "quz";
  };
  
  // .cpp
  void foo::bar() {
    std::string str(baz); // undefined reference to baz
  }
  </code></pre>