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 703791 - [PATCH] Out-of-line docs for class template specialisations failing
[PATCH] Out-of-line docs for class template specialisations failing
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.4-GIT
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-07-08 14:10 UTC by o.mandel
Modified: 2013-08-23 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for "Out-of-line docs for class template specialisations failing" (1.47 KB, patch)
2013-07-08 14:10 UTC, o.mandel
none Details | Review

Description o.mandel 2013-07-08 14:10:57 UTC
Created attachment 248616 [details] [review]
Patch for "Out-of-line docs for class template specialisations failing"

When documenting a class template specialisation out of line, the template arguments are interpreted as the second argument, i.e. as the header-file argument. Example of the problem:

>// a.cxx
>
>template<typename T> struct A { };
>
>/// \brief Correctly documented specialisation
>template<> struct A<bool> { };
>
>template<> struct A<int> { };
>
>/** \struct A
> *  \brief Some class template
> *  \tparam T Name of the type
> */
>
>/** \struct A<int>
> *  \brief Non-working specialisation
> */

Use these commands to generate a default Doxyfile and to run it:

>$ doxygen -g
>$ doxygen
>[...]
>[a.cxx]:15: warning: the name `int' supplied as the argument of the [\class] command is not an input file
>[...]
>[a.cxx]:8: warning: Compound A< int > is not documented.
>[...]

The attached patch fixes the problem for me, but it has two problems:
* It breaks old (potentially undesired) functionality: \class A<a.h> (without space) was allowed before but fails to work now
* The QRegExp cleanup is probably not ideal. There must be a better function to call to get the canonical class name.
Comment 1 Dimitri van Heesch 2013-08-23 13:36:17 UTC
Thanks, I'll include your patch in the next git update.

The cleanup function you were looking for is called removeRedundantWhiteSpace()
Comment 2 Dimitri van Heesch 2013-08-23 15:04:18 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.5. 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.