title: How can I distinguish overloads of templates with non-type parameters?
body: <p>Here are two template functions, that differ only in their template parameters. The rest of the parameters are exactly the same.</p>
  
  <pre><code>    template&lt;int module&gt;
      void template_const(int &amp;a,int &amp; b){
              a = a &amp; module;
              b = b % module;
      }
  
      template&lt;bool x&gt;
      void template_const(int &amp;a,int &amp; b){
              int w;
              if (x){
                      w = 123;
              }
              else w = 512;
              a = a &amp; w;
              b = b % w;
      }
  </code></pre>
  
  <p>When I try to call them like this</p>
  
  <pre><code>template_const&lt;true&gt;(a,b)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>template_const&lt;123&gt;(a,b)
  </code></pre>
  
  <p>the compiler tells me that the call is ambiguous. How can I call these two functions?</p>