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 759241 - Doxygen fails to create man page for template specialization
Doxygen fails to create man page for template specialization
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.10
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2015-12-09 11:59 UTC by Jonathan Wakely
Modified: 2018-07-30 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonathan Wakely 2015-12-09 11:59:03 UTC
Given this code (a real example taken from the GNU C++ standard library):

namespace gnu_pbds
{
  struct null_type { };

  namespace detail
  {
    /// Binary search tree traits, primary template
    template<typename Key,
	     typename Mapped,
	     class Cmp_Fn,
	     template<typename T> class Node_Update,
	     class Node,
	     typename _alloc>
    struct bin_search_tree_traits
    {
    };

    /// Specialization.
    template<typename Key,
	     class Cmp_Fn,
	     template<typename T> class Node_Update,
	     class Node,
	     typename _alloc>
    struct bin_search_tree_traits<
      Key,
      null_type,
      Cmp_Fn,
      Node_Update,
      Node,
      _alloc>
    {
    };

  } // namespace detail
} // namespace gnu_pbds

And this config:

GENERATE_HTML = no
GENERATE_LATEX = no
GENERATE_MAN = yes
INPUT = .


Doxygen fails with:

[...]
Generating docs for compound gnu_pbds::null_type...
Generating docs for compound gnu_pbds::detail::bin_search_tree_traits...
Generating docs for compound gnu_pbds::detail::bin_search_tree_traits<                                  Key,                           null_type,                           Cmp_Fn,                           Node_Update,                           Node,                           _alloc >...
error: Could not open file /tmp/doxygen/man/man3/gnu_pbds_detail_bin_search_tree_traits_                                  Key,                           null_type,                           Cmp_Fn,                           Node_Update,                           Node,                           _alloc _.3 for writing
Exiting...

The name of the file it's trying to open is ridiculous.

This is a regression, 1.8.9.1 ran successfully, producing these files:

gnu_pbds_detail_bin_search_tree_traits.3
gnu_pbds_detail_bin_search_tree_traits_ Key, null_type, Cmp_Fn, Node_Update, Node, _alloc _.3
gnu_pbds_null_type.3
Comment 1 Evangelos Foutras 2015-12-09 16:09:23 UTC
This appears to be caused by the following commit:

    commit 080a465b1321ff93c05ce398cd18a577e0ebae4b
    Author: Dimitri van Heesch <dimitri@stack.nl>
    Date:   Sat Feb 21 17:12:30 2015 +0100

        Added type constraint relations for Java generics
        to dot graphs and XML output

In particular, reverting the first hunk in src/util.cpp makes the issue go away. [1]

[1] https://github.com/doxygen/doxygen/commit/080a465b1321#diff-b7702a084eb00fb47f9800fd68271951
Comment 2 Jonathan Wakely 2015-12-10 12:20:23 UTC
Putting the specialization template-id all on one line is a workaround:

    /// Specialization.
    template<typename Key,
	     class Cmp_Fn,
	     template<typename T> class Node_Update,
	     class Node,
	     typename _alloc>
    struct bin_search_tree_traits< Key, null_type, Cmp_Fn, Node_Update, Node, _alloc>
    {
    };
Comment 3 Matthias Klose 2016-01-15 14:19:21 UTC
Indeed that fixes the libstdc++ doc build:

Index: b/src/util.cpp
===================================================================
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1745,8 +1745,6 @@ nextChar:
           (s.at(i-1)==')' && isId(c)) // ")id" -> ") id"
           ||
           (c=='\''  && s.at(i-1)==' ')  // "'id" -> "' id"
-          ||
-          (i>1 && s.at(i-2)==' ' && s.at(i-1)==' ') // "  id" -> " id"
          )
         )
     {
Comment 4 André Klapper 2018-07-30 10:31:46 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!