Simon Kraemer
Simon Kraemer

Reputation: 5680

Doxygen 1.8.13 ignores parameters with default values (C++)

We are currently making our comments Doxygen-compatible, but have stumbled upon an issue with default parameters.

One example would be this function:

...
class String : public Object
{
     ...
    /*! 
    * \brief Trim the string from the left while the characters matches any characters in the given string
    * \param In_pChar - (optional) The array of characters to be trimmed
    * \return The trimmed string object
    */
    String& trim_left(const char * In_pChar=" \t");
    ...
};
...

Doxygen just completely omits the parameter and even warns about it:

warning: argument 'In_pChar' of command @param is not found in the argument list of String::trim_left()

The resulting HTML isn't really what I expected it to be: Screenshot of Doxygen HTML output

Does anyone have an idea on how to fix this?

Upvotes: 1

Views: 791

Answers (1)

xaxxon
xaxxon

Reputation: 19761

Your problem is almost certainly in one of your ...s or you have a bugged version of doxygen.

The following code works fine for me:

class String : public Object                                                                            
{                                                                                     
public:                                                                                                 

/*!                                                                                                     
 * \brief Trim the string from the left while the characters matches any characters in the given string 
 * \param In_pChar - (optional) The array of characters to be trimmed                                   
 * \return The trimmed string object                                                                    
 */                                                                                                     
    String& trim_left(const char * In_pChar=" \t");                                                     

};                                                           

enter image description here

enter image description here

Upvotes: 3

Related Questions