After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619790 - Linking to template specializations inside a @link structural command fails
Linking to template specializations inside a @link structural command fails
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.3
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-05-27 08:51 UTC by Jakob van Bethlehem
Modified: 2013-05-19 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Little code that demonstrates the described bug (534 bytes, text/x-c++src)
2010-05-27 08:51 UTC, Jakob van Bethlehem
Details

Description Jakob van Bethlehem 2010-05-27 08:51:11 UTC
Created attachment 162079 [details]
Little code that demonstrates the described bug

The attached sourcefile shows the situation. There is some template, which is by default not implemented. Only some specializations are relevant for the code and should be allowed to be instantiated. In the documentation I try to create a link to either one of this specializations (an int-version here) without having the full name of that specialization appear in the documentation. 

When creating a link to that specialization by the automatic linking process, it works. When trying inside a @link - @endlink block it fails.
Comment 1 Matthew 2011-11-01 21:22:16 UTC
It seems doxygen has many issues dealing with template specializations.  I have never been able to get links (automatic or otherwise) to work against template specializations.
Comment 2 Dimitri van Heesch 2011-11-01 21:51:03 UTC
Hi Matthew, 

Thanks for your feedback, but can you attach examples demonstrating the many issues you found? That would help me in fixing them.
Comment 3 Matthew 2011-11-02 13:01:25 UTC
For me, I have never been able to get template specializations to work in any part of a comment that uses auto-linking or explicit linking, as Jakob did.  An example would be if I defined a signal class and a set of specializations such as:

/** @brief The signal class allows many functions to be attached ...
Only a limited number of specializations exist for @p Signature, they are:
@li @ref signal<void(void)>
@li @ref signal<void(Arg0&)>
@li @ref signal<void(Arg0&,Arg1&)>
*/
template <typename Signature>
class signal { ... };

template <>
class signal<void(void)> { ... };

template <typename Arg0>
class signal<void(Arg0&)> { ... };

template <typename Arg0, typename Arg1>
class signal<void(Arg0&,Arg1&)> { ... };

To make a link to any specialization, I have resourced to using the <a> tag like so:
@li <a href="classsignal_3_01void_07void_08_4.html"
    ><b>signal\<void(void)\></b></a>
@li <a href="classsignal_3_01void_07_arg0_01_6_08_4.html"
    ><b>signal\<void(Arg0&)\></b></a>
...
Comment 4 Matthew Woehlke 2013-01-22 17:32:04 UTC
I likewise can't get this to work (at all), using Doxygen 1.8.3:

/// Documentation here. This works.
template <typename T> struct default_delete { ... }

/// Documentation here. This also works; shows up as a separate class.
template <typename T> struct default_delete<T[]> { ... }

/// More documentation.
/// A link to default_delete works as expected.
/// It links to the generic variant.
/// A link to default_delete<T[]> does not work as desired.
/// It also links to the generic variant, not the specialization.
void foo();


...I've also tried e.g. escaping the <>'s, using &lt;/&gt; instead, using \ref, using \link... nothing I've tried generates a link to the specialization. (I did however check the tag file, and there IS a tag for the specialization. I would guess that the way doxygen parses the text, it stops gathering charaters for the tag when it gets to the '<' (in whatever form), and so always finds the generic variant and not the specialization.)
Comment 5 Dimitri van Heesch 2013-04-01 14:30:58 UTC
Problems should be fixed with David's patch posted here:
http://doxygen.10944.n7.nabble.com/PATCH-Improved-support-for-linking-to-template-specializations-td5806.html

I'll include this patch in the next subversion update.
Comment 6 Dimitri van Heesch 2013-05-19 12:35:54 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.4. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.