title: Overloading Macro on Number of Arguments
body: <p>I have two macros <code>FOO2</code> and <code>FOO3</code>:</p>
  
  <pre><code>#define FOO2(x,y) ...
  #define FOO3(x,y,z) ...
  </code></pre>
  
  <p>I want to define a new macro <code>FOO</code> as follows:</p>
  
  <pre><code>#define FOO(x,y) FOO2(x,y)
  #define FOO(x,y,z) FOO3(x,y,z)
  </code></pre>
  
  <p>But this doesn't work because macros do not overload on number of arguments.</p>
  
  <p>Without modifying <code>FOO2</code> and <code>FOO3</code>, is there some way to define a macro <code>FOO</code> (using <code>__VA_ARGS__</code> or otherwise) to get the same effect of dispatching <code>FOO(x,y)</code> to <code>FOO2</code>, and <code>FOO(x,y,z)</code> to <code>FOO3</code>?</p>