After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678097 - C++ keyword "final" not understood
C++ keyword "final" not understood
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.1
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-06-14 12:12 UTC by adrien.lafage
Modified: 2012-08-11 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample of code + conf file + doxygen html report (38.48 KB, application/x-zip-compressed)
2012-06-14 12:12 UTC, adrien.lafage
Details

Description adrien.lafage 2012-06-14 12:12:30 UTC
Created attachment 216408 [details]
sample of code + conf file + doxygen html report

Hello,

We use C++11, and keyword "final" seems to be not interpretated by doxygen.
When generating a report, doxygen thinks that "final" is the name of the class.
That's quite embarrassing if more than one class is final, because doxygen considers it is all about the same class (the one called "final")

Here is a compilable code sample:
 
#include <iostream>

using namespace std;

/**
 * This class is an example of final class.
 * It has only one member : integer i.
 *
 * This class is final.
 */
class A final {

	public:
		/**
                * Get i
                * @return the value of i
                */  	
		int getI(){return i;}
		/**
 		* Set i to the parameter _i
 		* @param _i the new value of i
 		*/  	
		void setI(int _i){i=_i;}
	private:
		/**
 		* Some integer 
 		*/ 	
		int i;
};


int main(){

A a;
a.setI(10);

cout << a.getI() << endl;
return 0;
}

NB: compile with -std=c++11 option.

A temporary workaround is :
- add "#define FINAL final" at the beginning of the file; 
- use "FINAL" rather than "final" at declaration of the class;
- add "FINAL=" at PREDEFINED in the doxygen configuration file.

Version used : Doxygen version 1.8.1
OS : CentOs release 6.2 (Final), 64bits

If there is any question, don't hesitate to ask!

Thank you in advance,

Adrien
Comment 1 Dimitri van Heesch 2012-07-15 13:00:09 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 2 Dimitri van Heesch 2012-08-11 13:18:17 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.2. 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.