It looks like the doxygen pre-processing manual page has all the necessary information. As a first step, try setting the MACRO_EXPANSION flag in the doxygen configuration file to YES , then in your MACRO_EXPANSION documentation
The action is done REPEAT_N_TIMES times.
As noted in the doxygen manual, this will expand all macro definitions (recursively, if necessary), which is often too much. Therefore, you can specify exactly which macros to expand using the EXPAND_ONLY_PREDEF and EXPAND_AS_DEFINED in the configuration file. For example, try installing
EXPAND_ONLY_PREDEF = YES
EXPAND_AS_DEFINED = REPEAT_N_TIMES
in the configuration file.
UPDATE: After @spamy comment, I studied this a bit more, and it seems that the methods I mentioned above do not work for macros in comment blocks, i.e. only macros in the source code are expanded. See, for example, this post on the doxygen sourceforge page. According to this post, the only way to achieve macro expansion inside comment blocks is to use the INPUT_FILTER configuration file INPUT_FILTER . Use something like
INPUT_FILTER = sed /REPEAT_N_TIMES/10
Warning: the above INPUT_FILTER not been tested.
If you do not want to use INPUT_FILTER then this answer for another INPUT_FILTER probably your best bet. In essence, this suggests that you can document the macro so that documentation readers can easily find real value. So add the documentation to your #define and just \ref elsewhere in your documentation.
Chris
source share