Topic: Preprocessor scanning/further replacement


Author: "Paul J. Lucas" <pjl@ptolemy-ethernet.arc.nasa.gov>
Date: 1996/07/12
Raw View
 Given:

  #define FORMAL(T) T
  #define ACTUAL(T) /* nothing */

  #define ARG_LIST(A) A(T1) a1, A(T2) a2

  void f( ARG_LIST(FORMAL) );

  main() {
   f( ARG_LIST(ACTUAL) );
  }

 will I get:

  void f( T1 a1, T2 a2 );

  main() {
   f( a1, a2 );
  }

 for both ANSI/ISO C/C++ and Classic C preprocessing?

 - Paul J. Lucas
   NASA Ames Research Center  Caelum Research Corporation
   Moffett Field, California  San Jose, California
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]