Any*_*orn 10 c++ documentation templates doxygen
有没有办法记录模板参数,如下所示:
template<
int N, ///< description
typename T ///< description
>
Run Code Online (Sandbox Code Playgroud)
而不是列出每个参数tparam?
请注意,函数参数可以在当前的doxygen中记录如下:
void function(int a /**< description */);
Run Code Online (Sandbox Code Playgroud)
如果没有,实施它会有多难?如果你熟悉doxygen内部,你能指出我实施它的方向.
谢谢
无法像您描述的那样记录模板参数.
我想说这不是一个好主意,因为那样你会记录你的模板参数与通常的参数不同,你为什么要这样?
通常它看起来像这样:
/*! \p transpose : transpose a matrix
*
* \param A input matrix
* \param At output matrix (transpose of A)
*
* \tparam MatrixType1 matrix
* \tparam MatrixType2 matrix
*/
template <typename MatrixType1, typename MatrixType2>
void transpose(const MatrixType1& A, MatrixType2& At);
Run Code Online (Sandbox Code Playgroud)
你希望它看起来像这样吗?!
/*! \p transpose : transpose a matrix
*
* \param A input matrix
* \param At output matrix (transpose of A)
*
*/
template <
typename MatrixType1, ///< matrix
typename MatrixType2 ///< matrix
>
void transpose(const MatrixType1& A, MatrixType2& At);
Run Code Online (Sandbox Code Playgroud)
为什么?
| 归档时间: |
|
| 查看次数: |
8592 次 |
| 最近记录: |