GNOME Bugzilla – Bug 758900
C++ templated member-function appears both as public and private
Last modified: 2015-12-30 10:19:56 UTC
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 <iostream> #include <initializer_list> #include <map> class MyClass { private: std::map<int, double> mymap; template<typename T> std::map<int, double>::mapped_type get(int i); /* template<typename T> 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<int>(i); } }; template<typename T> 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; }
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)
Confirmed. Should be fixed in the next GIT update.
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).