title: Non-type template parameter with template parameter pack
body: <p>I am checking the validity of a string whose valid values are known at compile time. I have the following simplified code snippet:</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;cassert&gt;
  #include &lt;string&gt;
  
  template &lt;char const* const _Rhs, char const* const _Rhs2,
            char const* const _Rhs3&gt;
  bool IsValid(std::string const&amp; _Lhs) {
      return _Rhs == _Lhs or _Rhs2 == _Lhs or _Rhs3 == _Lhs;
  }
  
  template &lt;char const* const _Rhs, char const* const _Rhs2&gt;
  bool IsValid(std::string const&amp; _Lhs) {
      return _Rhs == _Lhs or _Rhs2 == _Lhs;
  }
  
  template &lt;char const* const _Rhs&gt;
  bool IsValid(std::string const&amp; _Lhs) {
      return _Rhs == _Lhs;
  }
  
  static const char record[] = &quot;record&quot;;
  static const char replay[] = &quot;replay&quot;;
  static const char idle[] = &quot;idle&quot;;
  
  int main() {
      assert((IsValid&lt;record&gt;(&quot;record&quot;)));
      assert((IsValid&lt;record, replay&gt;(&quot;replay&quot;)));
      assert((IsValid&lt;record, replay, idle&gt;(&quot;idle&quot;)));
      assert((not IsValid&lt;record, replay, idle&gt;(&quot;unknown&quot;)));
  }
  </code></pre>
  <p>Is there a way I could <strong>generalize</strong> the <em>IsValid</em> function to take an arbitrary number of template parameters?</p>
  <p>Something like:</p>
  <pre class="lang-cpp prettyprint-override"><code>template &lt;char const* const _Rhs, typename... Args&gt;
  bool IsValid(std::string const&amp; _Lhs) {
      return _Rhs == _Lhs or IsValid&lt;Args...&gt;(_Lhs);
  }
  </code></pre>