2017-07-07 90 views
1

我们目前正在评论Doxygen兼容性,但已经偶然发现了默认参数的问题。Doxygen 1.8.13忽略带默认值的参数(C++)

一个例子是这样的功能:

... 
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

有没有人有关于如何解决这个问题的想法?

+0

已经有[Doxygen的许多版本(http://www.stack.nl/~dimitri /doxygen/manual/changelog.html)。你问哪一个? –

+0

@LightnessRacesinOrbit Doxygen 1.8.13。我相应地更新了这个问题。 –

回答

3

你的问题几乎可以肯定是你的...之一,或者你有一个doxygen的bug版本。

下面的代码工作正常,我:

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

+0

我会尽量缩小范围。谢谢。 –

+0

提供的示例工作得很好。我还没有找到真正的问题。 –

+0

这就是为什么我说问题可能出现在你的'...'s中,为什么发布[mcve]很重要,所以问题的范围可以是有限的:) – xaxxon