mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
406 stars 92 forks source link

how to correctly document the full templated functions #199

Closed tsung-wei-huang closed 3 years ago

tsung-wei-huang commented 3 years ago

It looks like I am not able to document the full function with template arguments but only a brief statement. For example, in my project, this in-code doc can only be correctly processed by doxygen.py with @brief. Ideally, I would like to have the following:

/**
@fn cuda_sort
@tparam P execution policy type
@tparam K_it keys iterator type
@tparam V_it values iterator type
@tparam C comparator type
@brief performs key-value sort on a range of items
*/

However, when I use doxygen.py to run my conf.py, the function is not documented. Would you please help take a look? I believe I mark this file to be documented.

mosra commented 3 years ago

Hi!

Interesting. This is something I do quite often and it works, although I have the doc commands in different order. Can you try this instead? If the doc block is right above the function, you shouldn't even need the @fn:

/**
@brief performs key-value sort on a range of items
@tparam P execution policy type
@tparam K_it keys iterator type
@tparam V_it values iterator type
@tparam C comparator type

It should be able to consume detailed description as well, if it's put here.
*/
tsung-wei-huang commented 3 years ago

@mosra thanks. This indeed fixes it - order matters.