Top "Macros" questions

***DO NOT USE for VBA / MS-Office languages.

error: pasting "." and "red" does not give a valid preprocessing token

I'm implementing The X macro, but I have a problem with a simple macro expansion. This macro (see below) is …

c macros c-preprocessor
How to generate a newline in a cpp macro?

How do I write a cpp macro which expands to include newlines?

c++ macros c-preprocessor
What predefined macro can I use to detect clang?

I'm trying to detect the compiler used to compile my source code. I can easily find predefined macros to check …

c macros clang c-preprocessor
Self-unrolling macro loop in C/C++

I am currently working on a project, where every cycle counts. While profiling my application I discovered that the overhead …

c++ c boost macros loop-unrolling
Empty function macros

If I define a function macro with no actual body, is it like an empty string with the compiler (i.…

c++ function macros compilation
How big can a malloc be in C?

I have a malloc in C that is 26901^2*sizeof(double) This got me thinking what the largest value can be …

c macros malloc totalview
How to control the rpmbuild buildroot and install directory

I am confused about some directories in rpmbuild. 1: buildroot: which should be used to store the files that are supposed …

macros installation rpmbuild buildroot
Which macro to wrap Mac OS X specific code in C/C++

While reading various C and C++ sources, I have encountered two macros __APPLE__ and __OSX__. I found plenty of use …

c++ c xcode macos macros
Documenting Macro Functions in C++ with Doxygen

How do I document a macro function in C++ using Doxygen, and refer to it in the documentation of my …

c++ macros doxygen
what language do I need to write macros in LIbre Office Calc?

I've written a bunch of VBA code for various things in Excel. I'm looking at migrating to libreOffice. Under Tool-&…

python macros libreoffice calc