title: How to check at compile time if a function is called
body: <p>I'm trying to identify at compile-time whether a function is ever called. Specifically, I want to throw a static assertion failure if it is:</p>
  
  <pre><code>template &lt;typename T&gt;
  auto Function(T value) -&gt; std::enable_if&lt;someCondition, int&gt;
  {
    // this is the function I want to call
  }
  
  template &lt;typename... T&gt;
  int Function(T...)
  {
    // This function should never be called, instead I want
    // a compile-time failure if this is called, because it
    // means the above function wasn't successfully resolved.
  }
  </code></pre>
  
  <p>The reason I want to do this is because failure to correctly call <code>Function()</code> with the correct conditions results in thousands of lines of compiler error messages, none of which are very helpful to anyone who is not intimately familiar with the code base.</p>
  
  <p>The reason I don't want to place a <code>static_assert</code> in <code>Function</code> is because we have many of these functions, and we have the means instead to generate the <code>Catch-all</code> versions via macros, which would avoid unnecessary growth of the code-base while producing more helpful error messages.</p>
  
  <p>Can this be done?</p>