GNOME Bugzilla – Bug 684050
line continuation in preprocessor in documented text
Last modified: 2018-07-30 10:30:51 UTC
I am trying to define some standard methods with common documentation, like so: #define MY_STANDARD_METHODS(name) \ /** Brief description of name. \ Detailed description of name. \ */ \ void my_standard_method() This *almost* works, except that doxygen emits the line continuation (\) characters verbatim in the documentation, which does not seem correct. Is this a bug (seems like it...)? Is there a way around this that does not require using ALIASES? (I have a single doxyfile template I use across multiple libraries, and would prefer to keep this sort of thing per-library.)
So, to answer part of my own question... #define MY_STANDARD_METHODS(name) \ /** Brief description of name. <!--\ --> Detailed description of name. <!--\ --> */ \ void my_standard_method() ...which is a fascinating hack, but still wondering if it should be necessary.
In https://stackoverflow.com/questions/46744573/does-doxygen-have-a-line-continuation-feature of user AcId on stackoverflow it was mentioned that in the following example: /** * \file mwe.cpp * * \details * MWE::MWE(int a, int b, int c) * MWE::MWE(int a, * int b, int c) */ class MWE { public: /** * \brief constructor with one parameter */ MWE(int a); /** * \brief constructor with three parameters **/ MWE(int a, int b, int c); } When generating the documentation, the first link (MWE::func(int a, int b, int c)) correctly points to the constructor taking three integer parameters. However, the second link, where there is a line-break, points to the constructor taking only a single integer parameter (also the parameter list does not become part of the link, only the function name). A "solution" for this was, similar to the solution of Matthew Woehlke: /** * \file mwe.cpp * * \details * MWE::MWE(int a, int b, int c) * MWE::MWE(int a, <!-- * --> int b, int c) */ class MWE { public: /** * \brief constructor with one parameter */ MWE(int a); /** * \brief constructor with three parameters **/ MWE(int a, int b, int c); }
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!