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++ - ##: "concatenation vs. juxtaposition" full dissertation...
(straight from boost email forum; just pasting it below...) ...............................Even if 'concatenation' per-se is not called for, and against the Standard, could it be that the "." (dot) relieves the preprocessor from responsibility for adding a space at the end of the preceding string (since the dot already acts as a kind of 'separator'..)? Dec 02 2003
I appreciate your doing this. I still think, however, that tokens are concatenated with the ## operator, and not otherwise. "dan" <dan_member pathlink.com> wrote in message news:bqjemg$m3b$1 digitaldaemon.com...(straight from boost email forum; just pasting it below...) ...............................Even if 'concatenation' per-se is not called for, and against the Standard, could it be that the "." (dot) relieves the preprocessor from responsibility for adding a space at the end of the preceding string (since the dot already acts as a kind of 'separator'..)? Dec 02 2003
I appreciate your doing this. I still think, however, that tokens are concatenated with the ## operator, and not otherwise. Dec 02 2003
To my question: ............................. But then I'm not sure what happens if the preprocessor encounters, a(something)else ............................. AG replied: -----------------------------------------------------16.3.3 [cpp.concat] para 3 (my emphasis): "For both object-like and function-like macro invocations, before the replacement list is reexamined for more macro names to replace, each instance of a ## preprocessing token in the replacement list (not from an argument) is deleted and the preceding preprocessing token is concatenated with the following preprocessing token. *If the result is not a valid preprocessing token, the behavior is undefined*. [...]" In the case in question, ")." is definitely not a valid preprocessing token (it's two). Dec 03 2003
|