looping over all arguments of a function in C++
<p>I want to do identical processing to a bunch of arguments of a function. Is there a way to loop over all arguments ? I am doing it the way represented in following code, but want to see if there is a compact way to do this.,</p>

<pre><code> void methodA(int a1, int a2, int b1, double b2){   
        //.. some code 
        methodB(a1, f(a1));
        methodB(a2, f(a2));
        methodB(b1, f(b1));
        methodB(b2, f(b2));
        // more code follows ...

   }

int f(int a){
      // some function. 
   return a*10;
}

double  f(double b){
   return b/2.0;
}
</code></pre>
