GNOME Bugzilla – Bug 733968
support for smart pointers continued (dereference operator in template)
Last modified: 2018-07-30 10:31:53 UTC
Created attachment 282011 [details] Contains the sources to reproduce the bug (Test.h and Test.cpp) and Test.png image showing the behaviour in the generated documentation. This bug is a continuation of bug 333931 ( support for smart pointers (dereference operator in template) ) which was fixed earlier. Doxygen appears to understand dereference operators (->) in a templatised smart pointer class only if the smart pointer instance is a local variable in the file and not when the smartpointer is defined as a global variable in another file. Please find the code below which can be used to reproduce the problem. Refer to the comments in test() function in Test.cpp. I have attached the files Test.h and Test.cpp in the attachments. /*BEGIN*************************TEST.H***********************BEGIN*/ namespace Foundation { template <class T> class SmartPointer { public: T* pointer; T* operator->() { return pointer }; }; } // end namespace Foundation namespace User { class A { public: void do() {}; int x; }; Foundation::SmartPointer<User::A> SmartA; } /// @class User::A /// Documentation for class A /// @property User::A::x /// Documentation for x /// @property User::A::do() /// Documentation for do /*END*************************TEST.H***************************END*/ /*BEGIN*************************TEST.CPP*********************BEGIN*/ #include "Test.h" void test() { // The below 3 lines are nicely linked. NOTE : do function and x have links // thanks to bug fix for 333931. Foundation::SmartPointer<User::A> smartA1; smartA1->do(); int x1 = smartA1->x; // In the below 2 lines do function and x don't have any links. User::SmartA->do(); int x = User::SmartA->x; } /*END*************************TEST.CPP*************************END*/
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!