Doxygen 1.8.13使用默认值忽略参数(C ++)

时间:2017-07-07 10:21:04

标签: c++ doxygen

我们目前正在发表与Doxygen兼容的评论,但偶然发现了默认参数的问题。

一个例子就是这个功能:

...
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完全省略了参数甚至警告它:

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

生成的HTML并不是我所期望的: Screenshot of Doxygen HTML output

有没有人知道如何解决这个问题?

1 个答案:

答案 0 :(得分:3)

您的问题几乎可以肯定是在...之一,或者您有一个错误的doxygen版本。

以下代码适用于我:

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

相关问题