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++ keyword "final" not understood (Origin: bugzilla #678097) #4749

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.1 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2012-06-14 12:12:30 +0000, adrien.lafage@gmail.com wrote:

Created attachment 216408
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

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

On 2012-07-15 13:00:09 +0000, Dimitri van Heesch wrote:

Confirmed. Should be fixed in the next subversion update.

On 2012-08-11 13:18:17 +0000, Dimitri van Heesch wrote:

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.

@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