title: Why is this constexpr static member function not seen as constexpr when called?
body: <p>Why is this <code>constexpr</code> <code>static</code> member function, identified by the <code>//! Nah</code> comment, not seen as <code>constexpr</code> when called?</p>
  
  <pre><code>struct Item_id
  {
      enum Enum
      {
          size, position, attributes, window_rect, max_window_size, _
      };
  
      static constexpr int n_items_ = _;                          // OK
      constexpr auto member_n_items() const -&gt; int { return _; }  // OK
      static constexpr auto static_n_items() -&gt; int { return _; } // OK
      static constexpr int so_far = n_items_;                     // OK
      #ifndef OUT_OF_CLASS
          static constexpr int bah = static_n_items();            //! Nah.
      #endif
  };
  
  constexpr auto n_ids() -&gt; int { return Item_id().member_n_items(); }    // OK
  
  auto main() -&gt; int
  {
      #ifdef OUT_OF_CLASS
          static constexpr int bah = Item_id::static_n_items();   // OK
      #endif
  }
  </code></pre>
  
  <p>MinGW g++ 5.1 reports</p>
  
  <pre>
  constexpr.cpp:12:46: error: 'static constexpr int Item_id::static_n_items()' called in a constant expression
       static constexpr int bah = static_n_items();                //! Nah.
  </pre>
  
  <p>Visual C++ 2015 reports</p>
  
  <pre>
  constexpr.cpp(12): error C2131: expression did not evaluate to a constant
  constexpr.cpp(12): note: failure was caused by call of undefined function or one not declared 'constexpr'
  constexpr.cpp(12): note: see usage of 'Item_id::static_n_items'
  </pre>
  
  <p>My text editor insists that the name in the call is the same as the name in the function definition.</p>
  
  <p>It appears to have something to do with incomplete class, because with <code>OUT_OF_CLASS</code> defined it compiles nicely.</p>
  
  <p>But then why does the <code>n_items_</code> data work, and, why such a rule (doesn't make sense to me)?</p>