title: template template that accepts a mixture of type and template arguments
body: <p>I'm trying to create a type trait that detects of a type if an instantiation of a given template. For example:</p>
  
  <pre><code>static_assert(IsInstantiationOf&lt;std::vector, std::vector&lt;int&gt;&gt;);
  static_assert(IsInstantiationOf&lt;std::map, std::map&lt;int, bool&gt;&gt;);
  static_assert(!IsInstantiationOf&lt;std::vector, std::map&lt;int, bool&gt;&gt;);
  </code></pre>
  
  <p>I have this working for many types, but not for non-type template arguments:</p>
  
  <pre><code>#include &lt;type_traits&gt;
  #include &lt;vector&gt;
  #include &lt;map&gt;
  #include &lt;array&gt;
  
  template&lt;template &lt;typename ...&gt; typename Of, typename ...T&gt;
  struct IsInstatiationOf : public std::false_type {};
  
  template&lt;template &lt;typename ...&gt; typename Of, typename ...T&gt;
  struct IsInstatiationOf&lt;Of, Of&lt;T...&gt;&gt; : public std::true_type {};
  
  bool my_less(int a, int b) {
      return false;
  }
  
  static_assert(IsInstatiationOf&lt;std::vector, std::vector&lt;int&gt;&gt;());
  static_assert(IsInstatiationOf&lt;std::map, std::map&lt;int, int, decltype(my_less)&gt;&gt;());
  static_assert(!IsInstatiationOf&lt;std::map, std::vector&lt;int&gt;&gt;());
  static_assert(IsInstatiationOf&lt;std::array, std::array&lt;int, 4&gt;&gt;()); // error :(
  </code></pre>
  
  <p>On godbolt: <a href="https://godbolt.org/z/2k4syB" rel="nofollow noreferrer">https://godbolt.org/z/2k4syB</a></p>
  
  <p>My hunch is that this can't be done because you can't have a parameter pack of mixed types and values. Is that correct? Or is there some way to do this that I'm missing?</p>