A textual macro processor applied before compiling C and C++ language programs.
We can use the preprocessor to know if unsigned long long is defined: #include <limits.h> #ifndef ULLONG_…
c c-preprocessor 128-bitWhat's the trick to create a variadic macro FOO(a1, a2, a3,..., an) such that it expands to FOOn(a1, …
c c-preprocessor variadic-macrosWhat C macro is in your opinion is the most useful? I have found the following one, which I use …
c macros c-preprocessor c99How are C++ include guards typically named? I tend to see this a lot: #ifndef FOO_H #define FOO_H // ... #…
c++ c-preprocessor include-guardsIn our legacy code, as well as our modern code, we use macros to perform nifty solutions like code generations, …
c++ c c-preprocessor stringificationThe standard array-size macro that is often taught is #define ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0])) or some equivalent formation. …
c arrays macros c-preprocessorWhat C preprocessor conditional should I use for OS X specific code? I need to include a specific library if …
c macos c-preprocessor conditional-compilationSo far I've got as far as: #define ADEFINE "23" #pragma message ("ADEFINE" ADEFINE) Which works, but what if ADEFINE isn't …
c gcc macros c-preprocessor pragmaI have been looking at the Boost libraries source code, and I have noticed that often there are single pound …
c++ c boost c-preprocessorI want to disable NSLog() across all instances in an app. I found some code that does that: #ifndef DEBUG #…
ios objective-c xcode c-preprocessor nslog