Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the right way to reference a template parameters in Doxygen?

A follow-up question to:

What's the right way to reference a parameter in Doxygen?

So, for parameters, we use @param

@param my_param the quick brown fox takes this parameter over the lazy dog

and then we can refer to it using @p:

@param my_other_param this is completely different from @p my_param , you know!

Now, for template parameters, I would replace @param with @tparam. What should replace the @p?

like image 243
einpoklum Avatar asked Oct 19 '22 05:10

einpoklum


1 Answers

@p doesn't really "reference" a parameter; it just styles the next word in typewriter font. You will generally use that to reference parameters, but @p doesn't do anything special beyond using typewriter font for the next word.

So you can use @p to style a template parameter if you like. Or you could use @a. Or something else. It's all up to the way you want the results to look.

like image 136
Nicol Bolas Avatar answered Oct 21 '22 02:10

Nicol Bolas