On Mon, May 07, 2012 at 01:00:21PM +0400, ext Konstantin Tokarev wrote: > void foo() > { > #ifdef foo > doSomething(); > #ifdef bar > bar(); > #else > notBar(); > #endif > #endif > } >
void foo() { #ifdef foo doSomething(); # ifdef bar bar(); # else notBar(); # endif #endif } works, too. just see the hash in the first column as a different "syntax space" (which it is), and then it makes perfect sense. there is one exception: #pragma and some other directives are sometimes passed through to the compiler, i.e., they are only "fake" preprocessor directives and in fact _kind of_ belong into the proper code stream. one could bikeshed this to no end ... _______________________________________________ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator