title: Does this program violate the ODR?
body: <p>Consider this program:</p>
  <pre><code>#include &lt;type_traits&gt;
  
  template &lt;typename T&gt; constexpr bool g() { return true; }
  template &lt;typename T&gt; std::enable_if_t&lt; g&lt;T&gt;()&gt; f() {}
  template &lt;typename T&gt; std::enable_if_t&lt;!g&lt;T&gt;()&gt; f() {}
  
  int main() { f&lt;int&gt;(); }
  </code></pre>
  <p>(<a href="https://godbolt.org/z/r93e9zrsn" rel="noreferrer">Compiler Explorer</a>)</p>
  <p>It is acceptable to various versions of GCC and Clang, but it is not acceptable to MSVC, which fails to compile with the error message</p>
  <pre><code>1&gt;D:\x.cpp(5,49): error C2995: 'enable_if&lt;0,void&gt;::type f(void)': function template has already been defined
  1&gt;D:\x.cpp(4): message : see declaration of 'f'
  1&gt;D:\x.cpp(4,49): error C3861: 'f': identifier not found
  </code></pre>
  <p>The first error message suggests an ODR violation to me - but if this program is ill-formed NDR, I need help understanding why that is so.  I've checked <a href="http://eel.is/c++draft/temp.over.link" rel="noreferrer">[temp.over.link]</a> in the standard draft, but I'm not confident that I'm interpreting it correctly.  To my understanding the program is okay because these function templates have differing signatures.</p>
  <p>In the unlikely case this program is correct, why does MSVC reject it?</p>