I am documenting some functions with template overloads and would want to reference to specific overloads. But I don't know how exactly to type the signature for the \ref
command to understand; it unfortunately requires a canonical version and I don't know it. Is there a way to get the list of canonical signatures doxygen generated?
My specific case is function declared like this:
template <typename T, size_t S>
int function(T value, Table const (&descriptors)[S]);
I've tried
\ref function(T,Table(&)[])
\ref function<>(T,Table(&)[])
\ref function(T,const Table(&)[])
\ref function<>(T,const Table(&)[])
\ref function(T,Table const(&)[])
\ref function<>(T,Table const(&)[])
And I've tried without the \ref
too (it's supposed to notice symbols automatically), but that was no better.
Or is there a way to define the reference myself?
I've also tried defining anchor in the target function documentation, but that points to the description body and not the header as reference to function should.
A bug in doxygen prevented @ref'ing parameters whose type included braces. I've just committed a possible solution to GitHub. Let me know if that works for you.
I used the following example to test it myself:
/** @file */
/** complex function */
template <typename T, size_t S>
int function(T value, Table const (&descriptors)[S]);
/** @mainpage
* See @ref function(T,Table const (&)[S]) "complex function" for details.
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With