title: Create dynamically null terminated parameters for C binding
body: <p>For my project I am binding a C++ method to a C function.
  This function is from gstreamer and is variadic in this form :</p>
  
  <pre><code>GstElement *gst_element_link_many(GstElement *el1, GstElement* el2 ,[...], nullptr);
  </code></pre>
  
  <p>Let's say I want to pass a vector to my bindings, what would be your approach ? Ideally I would have this result</p>
  
  <pre><code>void linkElements(std::vector&lt;GstElement*&gt;&amp; elements) {
      [...]
      gst_element_link_many(elementList... , nullptr);
  }
  </code></pre>
  
  <p>I am thinking of parameter packs but I am unsure of how to implement those.</p>
  
  <p>Thanks !</p>
  
  <p>Edit: I can't modify the gstreamer function so I can't pass a pointer. Gstreamer as a gst_element_link(GstElement* el1, GstElement *el2); function but it behaves differently because it links elements 2 by 2 and thus computes capabilities of each pair independently.</p>