Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - [Bug report] Whitespace prevents concatenation in preprocessor
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 CAT2(x, y) x##y 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
|