Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find correct doxygen reference to things with complicated signatures?

Tags:

c++

doxygen

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.

like image 401
Jan Hudec Avatar asked Sep 04 '13 13:09

Jan Hudec


1 Answers

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.
 */
like image 163
doxygen Avatar answered Sep 20 '22 22:09

doxygen