title: Wrapper function in C++ with arbitrary number of arguments
body: <p>I am working with a certain C API which has a certain <code>CallMethod</code> function (it is the Python API, but it should be irrelevant). Like the following:</p>
  
  <pre><code> void * C_API_CallMethod(void *h1, void *h2, ...);
  </code></pre>
  
  <p>I would like to encapsulate this into a C++ library with some fancy types. In particular, all my objects are <code>FancyHandler</code> objects which have a certain method <code>getPointer</code>.</p>
  
  <p>Something like that:</p>
  
  <pre><code>//template&lt;&gt;?
  FancyHandler CallMethod(const FancyHandler &amp;first, const FancyHandler &amp;second, 
              const FancyHandler&amp; ...list) {
  
      return C_API_CallMethod(first.getPointer(), second.getPointer(), 
          (...).getPointer(), nullptr);
  }
  </code></pre>
  
  <p>I was looking into variadic template, but is not exactly what I want. Or it seems a bit too complex because the type is known, and the number of arguments not. Variadic seems more general and I don't know how to constrain those things.</p>
  
  <p>Using <code>cstdarg</code> seemed a step backwards and I was expecting to avoid that... moreover, I haven't used it in a long time and am not eager to start again. I would prefer a more C++ solution.</p>
  
  <p>At this point, I am not able to compile the source, as the compiler complains about the ellipsis because obviously, it is not valid source.</p>
  
  <p>How should I solve this problem?</p>