title: User defined literal arguments are not constexpr?
body: <p>I'm testing out user defined literals. I want to make <code>_fac</code> return the factorial of the number.</p>
  
  <p>Having it call a <code>constexpr</code> function works, however it doesn't let me do it with templates as the compiler complains that the arguments are not and cannot be <code>constexpr</code>.</p>
  
  <p>I'm confused by this - aren't literals constant expressions? The <code>5</code> in <code>5_fac</code> is always a literal that can be evaluated during compile time, so why can't I use it as such?</p>
  
  <p>First method:</p>
  
  <pre><code>constexpr int factorial_function(int x) {
    return (x &gt; 0) ? x * factorial_function(x - 1) : 1;
  }
  
  constexpr int operator "" _fac(unsigned long long x) {
    return factorial_function(x); // this works
  }
  </code></pre>
  
  <p>Second method:</p>
  
  <pre><code>template &lt;int N&gt; struct factorial_template {
    static const unsigned int value = N * factorial_template&lt;N - 1&gt;::value;
  };
  template &lt;&gt; struct factorial_template&lt;0&gt; {
    static const unsigned int value = 1;
  };
  
  constexpr int operator "" _fac(unsigned long long x) {
    return factorial_template&lt;x&gt;::value; // doesn't work - x is not a constexpr
  }
  </code></pre>