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?

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.