当使用默认参数时,我设置
void method1(float v, float w =1.0)
在定义中使用注释是否是一种好习惯?
void class::method1(float v, float w /*=1/0*/)
我希望以这种方式获得一些符合doxygen的文档:
/**
* Description of the behavior/purpose of your method
*
* @param v The float 'v' (whatever this means)
* @param w Optional float 'w' (whatever this means), default value is 1.0.
*/
void method1(float v, float w =1.0);
通常,我不会在实现特定的块中添加其他注释,
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句