6

I am trying to get the best out of doxygen and IntelliSense, and found the XML commands to be a pretty good win here: documentation get generated on one hand, while it appears during completion on the other hand.

One of the catches though, is the inline documentation after members.

The doxygen manual mentions only one way to have documentation after members: ///<. Unfortunately it clashes with Visual Studio's, as illustrated here:

enum
{
    A, ///< Doxygen understands this, but IntelliSense is oblivious to it.
    B, ///  <summary>IntelliSense understands this, but Doxygen applies it to the wrong member.</summary>
    C, ///< <summary>Doxygen understand this, but IntelliSense considers it to be invalid XML.</summary>
};

Is there a way to write documentation after members in XML in a way that is understood correctly by both Doxygen and Visual Studio, or should I fall back on commenting on the preceding line?

albert
  • 8,285
  • 3
  • 19
  • 32
Julien Guertault
  • 1,324
  • 1
  • 15
  • 25

1 Answers1

0

It's not exactly pretty, but you can use //!< instead. That way Visual Studio won't try to parse the comment as XML.

As mentioned in the linked doxygen documentation:

Most often one only wants to put a brief description after a member. This is done as follows:

int var; //!< Brief description after the member

or

int var; ///< Brief description after the member

Lukas
  • 2,461
  • 2
  • 19
  • 32