title: How to implement a generic vector of functions?
body: <p>I would like to implement something of this sort, and I don't think it's supported by the language.</p>
  
  <pre><code>std::vector&lt; std::function&lt; void(ANY TYPE) &gt; &gt; = v;
  </code></pre>
  
  <p>We have:</p>
  
  <pre><code>void f1(A*){}
  void f2(B*){}
  </code></pre>
  
  <p>then,</p>
  
  <pre><code>v[0] = std::bind(f1,_1);
  v[1] = std::bind(f2,_1);
  </code></pre>
  
  <p>then,</p>
  
  <pre><code>A* a = new A;
  v[0](a);
  
  B* b = new B;
  v[1](b);
  </code></pre>
  
  <p>Is there any construct in C++ that will allow me to do something like this?</p>