Let's assume the following code
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
/* en/disable second arg by un/commenting */
#define B_ARG_ENABLED
/**
* \fn add_stuff
* \brief add stuff to stuff
* \param a : bla bla
//////#ifdef B_ARG_ENABLED (obviously not working)
* \param b : blb blb
//////#endif //B_ARG_ENABLED
* \param c : blc blc
* \return : some stuff
*/
int add_stuff(int a,
#ifdef B_ARG_ENABLED
int b,
#endif //B_ARG_ENABLED
int c)
{
int total = 0;
total += a;
#ifdef B_ARG_ENABLED
total += b;
#endif //B_ARG_ENABLED
total += c;
return total;
}
int main(void)
{
printf("hello %d",add_stuff(
1,
#ifdef B_ARG_ENABLED
2,
#endif //B_ARG_ENABLED
3));
return 0;
}
I would like to have a unique doxygen header of a function but this function has a argument that is conditioned by a preprocessor variable.
Is there a way to keep a unique doxygen header?
i.e: not using two wrappers add_stuff2 and add_stuff3