title: Empty variardic packs of enums -- do they make two functions different?
body: <p>There is a technique I sometimes use when overriding <code>template</code> functions that goes like this:</p>
  
  <pre><code>#include &lt;utility&gt;
  template&lt;int&gt; struct unique_enum { enum class type {}; };
  template&lt;int index&gt; using UniqueEnum = typename unique_enum&lt;index&gt;::type;
  template&lt;bool b, int index=1&gt;
  using EnableFuncIf = typename std::enable_if&lt; b, UniqueEnum&lt;index&gt; &gt;::type;
  template&lt;bool b, int index=1&gt;
  using DisableFuncIf = EnableFuncIf&lt;!b, -index&gt;;
  
  // boring traits class:
  template&lt;typename T&gt;
  struct is_int : std::false_type {};
  template&lt;&gt;
  struct is_int&lt;int&gt; : std::true_type {};
  
  #include &lt;iostream&gt;
  // use empty variardic packs to give these two SFINAE functions different signatures:
  template&lt;typename C, EnableFuncIf&lt; is_int&lt;C&gt;::value &gt;...&gt;
  void do_stuff() {
    std::cout &lt;&lt; "int!\n";
  }
  template&lt;typename C, DisableFuncIf&lt; is_int&lt;C&gt;::value &gt;...&gt;
  void do_stuff() {
    std::cout &lt;&lt; "not int!\n";
  }
  
  int main() {
    do_stuff&lt;int&gt;();
    do_stuff&lt;double&gt;();
  }
  </code></pre>
  
  <p>This distinguishes <code>do_stuff</code> from <code>do_stuff</code>, because one takes 0 or more <code>UniqueEnum&lt;1&gt;</code>s, and the other takes 0 or more <code>UniqueEnum&lt;-1&gt;</code>s.  gcc 4.8 considers these different empty packs to be distinct.</p>
  
  <p>However, in the latest version of clang I tried, this fails: it treats the function with 0 <code>UniqueEnum&lt;1&gt;</code>s as being the same as the function with 0 <code>UniqueEnum&lt;-1&gt;</code>s.</p>
  
  <p>There are easy workarounds that work in clang, but I'm wondering if my above technique is legal -- do two function <code>template</code>s, which differ only by empty variardic parameter packs, actually different?</p>