title: Why aren't static data members allowed in local classes?
body: <p>What is the reasoning to why <code>static const</code> members cannot exist in local classes? It seems like a rather silly restriction.</p>
  
  <p>Example:</p>
  
  <pre><code>void foo() {
    struct bar {
      int baz() { return 0; }   // allowed
      static const int qux = 0; // not allowed?!?
    };
  }
  
  struct non_local_bar {
    int baz() { return 0; }   // allowed
    static const int qux = 0; // allowed
  };
  </code></pre>
  
  <p>Quote from standard (9.8.4):</p>
  
  <blockquote>
    <p>A local class shall not have static data members.</p>
  </blockquote>