title: C++ template template non-type parameter
body: <p>I am trying to achieve the following:</p>
  
  <pre><code>template&lt;template&lt;typename&gt; bool Function_, typename ... Types_&gt;
  constexpr auto find(Tuple&lt;Types_ ... &gt;) noexcept
  {
      // ... 
  }
  </code></pre>
  
  <p>where a possible function could be:</p>
  
  <pre><code>template&lt;typename T&gt;
  inline constexpr bool is_pointer_v = is_pointer&lt;T&gt;::value;
  </code></pre>
  
  <p>so then the usage of find would be:</p>
  
  <pre><code>Tuple&lt;int, char, void *&gt; t;
  find&lt;is_pointer_v&gt;(t);
  </code></pre>
  
  <p>don't worry about the implementation of find, I am just asking about how to do "<code>template &lt; typename &gt; bool Function_</code>" as the <code>bool</code> part is invalid in c++ currently.</p>
  
  <p>any help is appreciated!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>here is an example of why I can't pass the "<code>is_pointer</code>" to the function:</p>
  
  <pre><code>template&lt;typename T_&gt;
  constexpr auto add_pointer(Type&lt;T_&gt;) noexcept
  { return type_c&lt;T_ *&gt;; }
  
  template&lt;typename F_, typename T_&gt;
  constexpr auto apply(F_ f, Type&lt;T_&gt; t) noexcept
  {
      return f(t);
  }
  
  int main(void)
  {
      Type&lt;int&gt; t_i;
      apply(add_pointer, t_i);
  }
  </code></pre>
  
  <p>this produces the compiler error:</p>
  
  <blockquote>
    <p>error: no matching function for call to ‘apply(&lt; unresolved overloaded function type >, sigma::meta::Type&amp;)’
             apply(add_pointer, t_i);</p>
  </blockquote>