2017-07-07 47 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