7

I have defined the following type traits struct with the associated documentation:

/*!
 * @brief Get the type at a given index Idx from a template parameter pack TPack. 
 *
 * Provides a member type holding the type at a given index Idx in a template
 * parameter pack TPack. 
 * <br> The index must be less than the template parameter pack dimension, otherwise
 * a compilation error will be triggered.
 *
 * @ingroup my_group
 */
template <unsigned int Idx, class... TPack>
struct TypeAt;

and then provided a convenience alias (defined in the same file and in the same namespace) as:

/*!
 * @ingroup my_group 
 */
template<unsigned int Idx, class... TPack>
using TypeAtT = typename TypeAt<Idx, TPack...>::type;

The documentation of the alias is displayed in the namespace documentation page. Instead of this, I would like to include it in the TypeAt class documentation page, under a named section, as the std::remove_cv documentation on cppreference.com does with the convenience alias std::remove_cv_t

This answer suggests to use the @relates command; however, as far as I understood, it does not allow to customise the title for one file only.

Another suggestion is to use doxygen grouping, but looking at the examples provided on this page it does not seem that gives the result I would like.

Can anyone suggest me whether it is possible to do what I'm trying to achieve, and how?

For completeness, I am using doxygen 1.8.13 on Ubuntu 18.04.

Thank you very much in advance.

Davide
  • 387
  • 2
  • 11
  • Which version of doxygen are you using? Could you post a more complete example so it is clear where the both pieces of code reside. As far as I now can deduct from the snippets both pieces are just in the namespace. I which class would you like that doxygen should place the information? – albert Jan 21 '20 at 09:39
  • @albert thanks for your comment, sorry if I was not clear enough. I'm using doxygen 1.8.13 on Ubuntu 18.04. Both pieces of code are defined in the same file, in the same namespace, just one above the other. I would like the documentation of the alias to appear in the `TypeAt` documentation page (take a look at the link on cppreference.com). I have updated the post as well to clarify these things. – Davide Jan 21 '20 at 11:52
  • Version 1.8.13 is already some years old, the current version is 1.8.17, though I don't think this issue ever popped up before, so won't be handled in this newer version in the requested way either. Maybe worth an issue in the doxygen issue tracker at github? – albert Jan 21 '20 at 11:59
  • 1
    I wad glad that someone has asked what I wanted on SO, and only to find out that there's no way to achieve it. – 김선달 Dec 19 '20 at 14:58

0 Answers0