Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I include '<' in Doxygen comments?

Say I'm documenting a member function using DOxygen/Visual studio compatible comments, how can I use the less than '<' symbol without creating a compiler warning but still maintaining readability in the codebase?

For example, if I did this:

    /// <summary>
    /// Verifies x < y
    /// </summary>
    bool VerifyIsLessThan(float x, float y);

The compiler says:

1>c:\MyProject\VerificationLib.h(246) : warning C4635: XML document comment applied to 'VerificationLib.VerifyIsLessThan(System.Single,System.Single)': badly-formed XML: Whitespace is not allowed at this location.

Is there any way to escape this in a way which leaves it still readable in the codebase as well as in the Doxygen generated docs?

[Edit]

I'm starting to think this is more to do with the visual studio side of things rather than Doxygen. We're using a form which should work for both. The warnings mentioned in the original question are from visual studio not Doxygen.

Digging a little deeper it looks like verbatim isn't supported directly?

like image 803
Jon Cage Avatar asked Sep 14 '12 13:09

Jon Cage


2 Answers

just use \< and that should be it. http://www.doxygen.nl/manual/commands.html#cmdlt

like image 159
risingDarkness Avatar answered Sep 28 '22 11:09

risingDarkness


You can use code or verbatim.

like image 34
gammay Avatar answered Sep 28 '22 10:09

gammay