Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class template specializations displayed incorrectly. #109

Open
cbiffle opened this issue Jul 13, 2015 · 0 comments
Open

Class template specializations displayed incorrectly. #109

cbiffle opened this issue Jul 13, 2015 · 0 comments

Comments

@cbiffle
Copy link

cbiffle commented Jul 13, 2015

Encountering several specializations (full or partial) of a class template mangles the documentation results for the template.

Found in b3fc442

Input

/*
 * Hello.
 */
template <typename T>
struct Unit {};

/*
 * Fully specialized.
 */
template <>
struct Unit<int> {};

/*
 * Fully specialized again.
 */
template <>
struct Unit<double> {};

/*
 * Partially specialized.
 */
template <typename T>
struct Unit<Unit<T>> {};

Expected Results

Unit is documented as a template. The availability of specializations is noted, since each specialization may have different members. Documenting them all on one page would be fine (as cppreference.com does) or on separate pages (as Doxygen seems to insist on doing).

The comments on each specialization are available where the specialization is documented.

Actual Results

In the top-level view, Unit appears three times, once as a template, and twice as a non-template:
top-level hierarchy view

All three link to the same place, #Unit/Unit. It looks like this:
view of the unit type itself

As you can see,

  • It isn't presented as a template at all.
  • The presence of full and partial specializations is not indicated (which I suppose makes sense, if it isn't a template).
  • It has the doc comment from the second full specialization only -- the others appear to have been lost.

In case you're curious, if you add members to the specialization whose doc comment appears (Unit<double>) they appear in the docs. Members added to the base template or other specializations are dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant