GNOME Bugzilla – Bug 318061
Template functions with the same signature belonging to templates with different template arguments must be considered different functions
Last modified: 2011-08-14 14:04:39 UTC
Version details: 1.4.5 /*! *@file t.cc */ /*! *@brief template A */ template <class T, class C, T C::*pm> inline bool Set(void* p, T& r) { static_cast<C*>(p)->*pm = r; return(true); } /*! *@brief template B */ template <class T, class C, T C::*pm, bool C::*pb> inline bool Set(void* p, T& r) { C* o = static_cast<C*>(p); o->*pm = r; o->*pb = true; return(true); }
I have the same problem, with 1.4.6. Another example, I hope it helps: ///i am documented template<class T> static void bug(T); ///i am ignored, with a warning template<int I, class T> static void bug(T);
I can confirm this problem with doxygen 1.5.9 on Windows. Although both functin templates are documented (in my case with more than just \brief part), Doxygen will generate only the entry for the first function template, but will merge the documentation texts (except for \brief section) from both function templates. It is not often that you have to write such templates, and it is nothing like critical issue, still I was surprised that it has been unconfirmed that long.
Confirmed. Should be fixed in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.6.0. Please verify if this is indeed the case and reopen the bug if you think it is not fixed (include any additional information that you think can be relevant).
Either I am not permitted to reopen the bug, or I just failed to see how to do it. In any case, 1.6.0 version (MS Windows setup exe) I just fetched from Doxygen download page does not appear to fix this bug. I will be attaching the screenshot of the produced (HTML) documentation and barebone example files used to produce it (header file, config file and layout file). It is my claim that the example documentation should list separate entries for two static_pointer_cast function templates, as they are different - the first accepts three template parameters and the second accepts four. As such those are different templates. The behavior of 1.6.0 does differ from 1.5.9 I used previously - in 1.6.0 the documentation of both function templates is no longer merged, but ignored.
Created attachment 141234 [details] screenshot of documentation produced by 1.6.0
Created attachment 141235 [details] Header file from which documenation was created
Created attachment 141236 [details] Configuration file
Created attachment 141237 [details] Layout file
I've encountered this problem as well, using the latest released version (1.7.4). Looking at the XML output, the problem appears to be that the IDs for the functions are the same, I'd guess because whatever hash generates the ID strings doesn't take template parameters into account.
Confirmed. The problem is the combination of grouping and functions that only differ in the number of template arguments. Should be fixed in the next subversion update. Jim: if you have a specific example that shows the problem in the XML output, then please attach it so I can see if it is also fixed.
Created attachment 186997 [details] source file for XML test case
Created attachment 186998 [details] configuration file for XML test case (with ambiguous.cc)
XML example attached. Bug is in the fact that the "id" attributes of the memberdef entries in classClass.xml are not distinct. Thanks!
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.7.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.