I am documenting my C++ code using Doxygen, and decided to do so only in the implementation files (above the function definitions), so that the header files (function declaration) stay small.
Header:
std::string color_to_hex(
const Color& c,
std::string prefix = "#",
bool uppercase = false
);
Implementation:
/**
* @brief ...
*/
std::string color_to_hex(
const Color& c,
std::string prefix,
bool uppercase
) {
// ...
}
Now, in the Doxygen-generated documentation, the default values of the parameters ("#"
and false
) do not appear.
I have tried:
- Use the @param tag. Doesn't work, no default param values appear.
- Move the doc-block to the declaration. Works, but as mentioned, not what I want.
- Add a minimal doc-block to the declaration (
/** */
). Nothing happens. - Add an additional (different) doc-block to the header. As expected, the documentation now contains both texts, but no default values appear.
- Add the identical doc-block to the declaration. Doxygen is smart enough to realize this and only outputs the text once. However, no default param values.
Any ideas on how to get this to work?