title: Templated references to std::array not invoking SFINAE* in MSVC . Bug?
body: <p>I ran across a problem upgrading templated array references to <code>std::array</code> where I had used this:</p>
  <pre><code>template&lt;class T, int N&gt;
  void f(T(&amp;a)[N]){/* do stuff */;}
  </code></pre>
  <p>This has worked in all compilers I have used so I just did this when changing to <code>std::array</code></p>
  <pre><code>template&lt;class T, int N&gt;
  void f(std::array&lt;T,N&gt;&amp; a){/* do stuff */;}
  </code></pre>
  <p>And this worked fine on MSVC. But when I ran the code on other compilers it did not
  The following code works in MSVC but not other compilers. See <a href="https://godbolt.org/z/d9cqWMeaM" rel="nofollow noreferrer">https://godbolt.org/z/d9cqWMeaM</a> which fails to match because N must be <code>std::size_t</code>.</p>
  <p>*This <a href="https://stackoverflow.com/questions/21740896/c-template-parameter-deduction-for-stdarray-with-non-size-t-integer">question</a> indicates that SFINAE should apply. However, as noted in the comments and in spite of the that answer, SFINAE, typically applies to rejection of malformed declarations. This is a deduction failure.</p>
  <p>Is MSVC's acceptance of this code a compiler bug? And is the <code>T(&amp;a)[N]</code> where <code>int N</code> was used legal even though all compilers I've ever used had no problem at all?</p>
  <p>This was somewhat annoying because some of the prior code used the fact N was signed in various places.</p>