Multiple preprocessor directives on one line in C++

Viewed 16009

A hypothetical question: Is it possible to have a C++ program, which includes preprocessor directives, entirely on one line?

Such a line would look like this:

#define foo #ifdef foo #define bar #endif

What are the semantics of such a line?

Further, are there any combinations of directives which are impossible to construct on one line?

If this is compiler-specific then both VC++ and GCC answers are welcome.

2 Answers
Related