GNOME Bugzilla – Bug 759241
Doxygen fails to create man page for template specialization
Last modified: 2018-07-30 10:31:46 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
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
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> { };
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" ) ) {
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!