title: inline constexpr function definition legal or not? gcc (ok) vs clang (error)
body: <p>My current program is rejected by clang but compiles fine with gcc. It boils down to the following simplified example: </p>
  
  <pre><code>struct A {
    static constexpr inline int one();
  };
  
  inline constexpr int A::one() { return 1; }
  
  int main() {
    return 0;
  }
  </code></pre>
  
  <p>g++ 4.7.2 compiles it without errors (<code>g++ -std=c++11 -Wall -g -o main example.cpp</code>). clang++ 3.1 rejects it:</p>
  
  <pre><code>$ clang++ -std=c++11 -Wall -g -o main example.cpp 
  example.cpp:6:25: error: conflicting types for 'one'
  inline constexpr int A::one() { return 1; }
                          ^
  example.cpp:3:31: note: previous declaration is here
    static constexpr inline int one();
                                ^
  1 error generated.
  </code></pre>
  
  <p>My bet is that gcc is right and and clang is wrong? The program should be legal C++11.</p>
  
  <p>Interesting sidenote. If <code>one</code> is implemented within the struct, clang no longer complains:</p>
  
  <pre><code>struct A {
    static constexpr inline int one() { return 1; }
  }
  </code></pre>
  
  <p>gcc also accepts this variant. From my understanding, both versions should be identical according to the standard. Is it a clang bug or am I missing something?</p>