Open akrzemi1 opened 6 days ago
This should already work
It does not, at least not for my header.
This is my header before the annotations. https://github.com/akrzemi1/markable/blob/master/include/ak_toolkit/markable.hpp
I first forward-declare my class template, and then later provide a definition. I will later try to upload a version with the annotations
Yes. If it doesn't find your @tparam, then that's just a bug we haven't seen yet. Probably related to these forward declarations because we have already used @tparam a lot.
Or maybe the @tparam asciidoc templates are missing for classes.
The three special things about my template is that:
typename
/** The main class template for instantiating markable types
@tparam MP mark policy that defines how the marked value is represented in the `representation_type`
*/
template <AK_TOOLKIT_MARK_POLICY MP, typename OP = order_none>
class markable;
MrDocs understands tparam, forward declarations, and macros.
https://github.com/cppalliance/mrdocs/blob/8537d3dbc71878a3ea6e176b0d25af8d0d51e799/test-files/golden-tests/duplicate-jdoc.cpp#L25-L37 https://github.com/cppalliance/mrdocs/blob/8537d3dbc71878a3ea6e176b0d25af8d0d51e799/test-files/golden-tests/duplicate-jdoc.xml#L90-L106
I believe the problem is much simpler. @tparams are just missing from the asciidoc templates:
https://github.com/cppalliance/mrdocs/blob/develop/share/mrdocs/addons/generator/asciidoc/partials/symbols/record.adoc.hbs https://github.com/cppalliance/mrdocs/blob/develop/share/mrdocs/addons/generator/asciidoc/partials/symbols/function.adoc.hbs
I believe the reason is that we have this pattern of not documenting @tparams when they're deduced from the @param, so we didn't notice that the @tparams were not in the templates at all.
Please edit the issue title and description to reflect the defect. Or open a new one.
Is it possible to extend the grammar of this "javadoc" format to allow describing the template parameters? This could look like this: