next up previous
Next: Macros need changing Up: Known bugs in the Previous: Reference parameters

Problem with use of macros with type specifiers containing commas

There is an unforseen problem with using macros for some parameter types---those containing commas. For example


is parsed by the preprocessor as two arguments to the macro. Thus parameters such as this cannot be used. We can get round this using a macro called COMMA so that instead of the above we put:

MACRO(array2<int COMMA double>)

This replacement of `,' by COMMA has to take place for all macro arguments that contain themselves commmas.

NOTE: Need to check if ISO C++ supports this hack, or whether it is just G++.