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

C++ templated member-function appears both as public and private (Origin: bugzilla #758900) #5900

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

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

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

On 2015-12-01 13:43:51 +0000, ajneu1@gmail.com wrote:

When generating documentation for the example at the bottom
using:
EXTRACT_PRIVATE = YES

...the member-fuction
get
is listed under both private and public,
even though it is only private !!!

http://melpon.org/wandbox/permlink/qlHpqKvfo9w4sYnn

// example
#include
#include <initializer_list>
#include

class MyClass {
private:
std::map<int, double> mymap;

template
std::map<int, double>::mapped_type get(int i);

/*
template
decltype(mymap)::mapped_type get(decltype(mymap)::key_type i); // same declaration prototype (as above), but using decltype
*/

public:
MyClass(std::initializer_list<decltype(mymap)::value_type> lst)
: mymap(lst)
{}

double getwrapper(int i) {
return get(i);
}
};

template
std::map<int, double>::mapped_type MyClass::get(int i)
{
T unused{}; // unused
return mymap.at(i);
}

int main()
{
MyClass my({{0, 0.0}, {1, 1.1}, {2, 2.2}, {3, 3.3}});

std::cout << my.getwrapper(2) << std::endl;
return 0;
}

On 2015-12-01 13:47:01 +0000, ajneu1@gmail.com wrote:

Perhaps similar to
https://bugzilla.gnome.org/show_bug.cgi?id=611462
(but while that is shown as resolved, the code-example above really does still cause incorrect documentation)

On 2015-12-06 10:37:32 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next GIT update.

On 2015-12-30 10:19:56 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.11. 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 (preferably in the form of a self-contained example).

@doxygen doxygen closed this Jul 2, 2018

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