Search code examples
visual-studio-2008doxygendocumentation-generation

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?


Solution

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