6

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?

Community
  • 1
  • 1
einpoklum
  • 118,144
  • 57
  • 340
  • 684

2 Answers2

5

@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.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
-1

To create a reference a another symbol use the @ref command. However this command does not work for parameters. Doxygen does not recognize them as a target of the @ref.

Gregg
  • 2,444
  • 1
  • 12
  • 21