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 684050 - line continuation in preprocessor in documented text
line continuation in preprocessor in documented text
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.2
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2012-09-14 21:46 UTC by Matthew Woehlke
Modified: 2018-07-30 10:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthew Woehlke 2012-09-14 21:46:52 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.)
Comment 1 Matthew Woehlke 2012-09-14 21:52:33 UTC
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.
Comment 2 albert 2017-10-14 16:46:36 UTC
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);
}
Comment 3 André Klapper 2018-07-30 10:30:51 UTC
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!