New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template functions with the same signature belonging to templates with different template arguments must be considered different functions (Origin: bugzilla #318061) #1837

Closed
doxygen opened this Issue Jul 1, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 1, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.4.x on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2005-10-05 22:16:32 +0000, cruff@ruffspot.net wrote:

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);

}

On 2006-02-14 17:45:16 +0000, kuodo wrote:

I have the same problem, with 1.4.6.
Another example, I hope it helps:

///i am documented
template
static void bug(T);

///i am ignored, with a warning
template<int I, class T>
static void bug(T);

On 2009-06-07 18:20:33 +0000, Leon wrote:

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.

On 2009-07-18 21:42:45 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2009-08-20 10:12:53 +0000, Dimitri van Heesch wrote:

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).

On 2009-08-20 11:13:34 +0000, Leon wrote:

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.

On 2009-08-20 11:14:33 +0000, Leon wrote:

Created attachment 141234
screenshot of documentation produced by 1.6.0

On 2009-08-20 11:15:42 +0000, Leon wrote:

Created attachment 141235
Header file from which documenation was created

On 2009-08-20 11:16:15 +0000, Leon wrote:

Created attachment 141236
Configuration file

On 2009-08-20 11:16:38 +0000, Leon wrote:

Created attachment 141237
Layout file

On 2011-05-01 07:26:01 +0000, Jim Bosch wrote:

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.

On 2011-05-01 20:23:17 +0000, Dimitri van Heesch wrote:

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.

On 2011-05-01 22:12:59 +0000, Jim Bosch wrote:

Created attachment 186997
source file for XML test case

On 2011-05-01 22:13:46 +0000, Jim Bosch wrote:

Created attachment 186998
configuration file for XML test case (with ambiguous.cc)

On 2011-05-01 22:14:51 +0000, Jim Bosch wrote:

XML example attached. Bug is in the fact that the "id" attributes of the memberdef entries in classClass.xml are not distinct.

Thanks!

On 2011-08-14 14:04:39 +0000, Dimitri van Heesch wrote:

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.

@doxygen doxygen closed this Jul 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment