title: Can template deduction guides call constexpr functions?
body: <p>I have my own fixed-size array type I want to be <code>constexpr</code> constructible from an <code>std::initializer_list</code> without having to explicitly define the size template argument.</p>
  
  <p>I thought I'd be able to use a template deduction guide but it looks like it's not treating <code>std::initializer_list::size()</code> as a constexpr function for it. </p>
  
  <p>Here's an example of trying to make a deduction guide for <code>std::array</code> (which is similar to my type and has the same problem):</p>
  
  <pre><code>namespace std
  {
      template&lt;typename T&gt; array(initializer_list&lt;T&gt; initialiserList) -&gt; array&lt;T, initialiserList.size()&gt;;
  }
  static constexpr std::array myArray = {1,2,3};
  static constexpr std::array myArray2 = {{1,2,3}};
  </code></pre>
  
  <p>I've tried on MSVC and Clang, both give roughly the same errors:
  <code>myArray</code> has an error complaining about too many arguments to the function.
  <code>myArray2</code> says "substitution failure [with T = int]: non-type template argument is not a constant expression"</p>
  
  <p>I tried putting <code>constexpr</code> in front of the deduction guide or the function argument but neither appears to be allowed, so it appears that the deduction guide is invalid even though it should work fine in a <code>constexpr</code> context.</p>
  
  <p>Is there a way to make this work without going down the <code>make_array()</code> route?</p>