c++ - [Bug report] Whitespace prevents concatenation in preprocessor
- Daniel James (12/12) Aug 12 2004 Hi,
Hi,
I've come across a few bugs in the preprocessor while converting the
boost preprocessor library. This one is probably the most problematic.
In the preprocessor, if a macro argument contains whitespace then it
prevents concatenation. The following example illustrates this:
#define EMPTY
#define CAT(x, y) CAT2(x, y)
#define
CAT(2 EMPTY, 2) // On DMC = 2 2
CAT(2, EMPTY 2) // On DMC = 2 2
Both concatenations should expand to '22', but instead result in '2 2'.
Daniel
Aug 12 2004








Daniel James <daniel calamity.org.uk>