
Arkadiy Vertleyb wrote:
And sometimes, I think, it's _the only_ way. If you are interested,
"Andrei Alexandrescu (See Website For Email)" <SeeWebsiteForEmail@moderncppdesign.com> wrote please
take a look at typeof_internals.htm.zip in the boost sandbox file vault.
The only way as long as you commit to not look outside C++. There are plenty of text manipulation tools outside C++ that offer what could be done with the C++ preprocessor with programming paradigms that I consider unworthy of learning. Those tools (sed, awk, perl) are widely available, and in my humble opinion any programmer worth her salt should have at least a cursory understanding of them.
Those tools also offer more power than the C++ preprocessor, within the confines of a much more pleasant programming paradigm.
Just out of curiosity: can you write a library that would require to pre-process your user's C++ text with one of these tools, and then convince anybody to use this library? If Perl is better then C++ preprocessor, then it should become C++ preprocessor. But it needs to be built-in, otherwise these are apples against oranges. Regards, Arkadiy