title: Variadic Generation of Tuples
body: <p>I want to write a c++ code that based on an integer value and a coordination, generates a set of tuples and function calls like this:</p>
  
  <pre><code>// dimension = 1, input = (i) generated tuples: (i-1) (i), (i+1)
  // dimension = 2, input = (i,j) generated tuples: (i-1, j), (i, j-1), (i, j),(i+1, j), (i, j+1)
  &lt;typename Index, int dimension&gt;
  void my_function(Index input)
  {
      // some magic here that generates the following code or sth like this
      get_value(generated_tuple0);
      get_value(generated_tuple1);
      ....
      ....
      get_value(generated_tupleN);
  
  }
  </code></pre>
  
  <p>I'm not good at template programming, maybe with variadics in C++11 it could be possible.</p>