title: Splitting arguments in C++ preprocessor
body: <p>Some legacy code I am working on has a macro which returns a comma-separated list intended to be used as function arguments. This is ugly, but the configuration file contains many of these and it would be difficult to change now.</p>
  
  <pre><code>#define XY1 0,0
  #define XY2 1,7
  ...
  
  void fun_point(x,y);
  
  fun_point(XY1);
  </code></pre>
  
  <p>This works fine as long as it is a function being called. However, when trying to call another macro with the parameters, the whole string is considered as one argument rather than split at the comma into two arguments</p>
  
  <pre><code>#define MAC_POINT(x,y) (x+y)
  MAC_POINT(XY1) #not expanded by preprocessor 
  </code></pre>
  
  <p>Is there a workaround for this problem without changing the XY definitions?</p>