In case I have my documentation separate from my code, how do I help Doxygen distinguish between overloaded functions (what to use in the \fn field)? A single function would be documented like this:
void func() {
}
/**
\fn func
\details Description here.
*/
What if I have two functions called func?
void func() {
}
void func(int i) {
}
/**
\fn [What goes here?]
\details Description here.
*/
You can simply document each overload as if it is a separate method (which it is, really 🙂 – just put the entire method signature in the \fn command instead of just the method’s name. As in:
(Sorry, I just had to move the doc comments above the methods where they belong 🙂
And indeed, you don’t need the \fn command at all, if the comment is directly ahead of the code element it pertains to.