title: Enum with constexpr std::string_view vs instantiated enum with std::string
body: <p>I would like to have <code>struct</code>s holding <code>enum</code>s for iteration, together with <code>std::string</code> holding their names for creating menu entries. I was using something like this:</p>
  
  <pre><code>struct S
  {
      enum E { ONE, TWO, ALL };
      std::array&lt;std::string, ALL&gt; names { "one", "two" };
  };
  int main()
  {
      S s;
      for(int i=s.ONE; i&lt;s.ALL; ++i) // or S::...
          std::cout &lt;&lt; s.names[i] &lt;&lt; '\n';
      return 0;
  }
  </code></pre>
  
  <p>As I understand, this is preferred to having global variables. It works, but needs instantiation before usage. Now, I found out about this method, which needs <code>--std=C++17</code> to compile:</p>
  
  <pre><code>struct S
  {
      enum E { ONE, TWO, ALL };
      static constexpr std::array&lt;std::string_view, ALL&gt; names { "one, "two" };
  };
  int main()
  {
      for(int i=S::ONE; i&lt;S::ALL, ++i)
          std::cout &lt;&lt; S::names[i] &lt;&lt; '\n';
  return 0;
  }
  </code></pre>
  
  <p>But how will this behave, in terms of memory usage, compared to my previous way of doing this? Or is there a wrong way in how I do it? What would be a better way?</p>