如何在C++中同时处理'Template'和'Docstring'
How to deal with 'Template' and 'Docstring' simultaneously in C++
使用关联的 template 和 docstring 编写 class 定义的标准顺序是什么,以使其可被识别IDE ?
是吗:
<docstring>
<template>
<class declaration/ definition>
或者:
<template>
<docstring>
<class declaration/ definition>
template和docstring的标准排序方式如下:
- Docstring
- Template
- Class declaration / definition
示例:
/**
* Class of Traveling Salesman Problem : Ctor :-
* @param nov: order of Graph (|V|)
* @param startVertex: Starting Vertex for Hamiltonian Traversal
* @param costMatrix (optional): accepts cost matrix, if not provided, then one should call input() function
*/
template<typename DT>
class TSP
{
...
};
旁注: 代码片段行为已在 MS Visual Studio IDE
上验证
使用关联的 template 和 docstring 编写 class 定义的标准顺序是什么,以使其可被识别IDE ?
是吗:
<docstring>
<template>
<class declaration/ definition>
或者:
<template>
<docstring>
<class declaration/ definition>
template和docstring的标准排序方式如下:
- Docstring
- Template
- Class declaration / definition
示例:
/**
* Class of Traveling Salesman Problem : Ctor :-
* @param nov: order of Graph (|V|)
* @param startVertex: Starting Vertex for Hamiltonian Traversal
* @param costMatrix (optional): accepts cost matrix, if not provided, then one should call input() function
*/
template<typename DT>
class TSP
{
...
};
旁注: 代码片段行为已在 MS Visual Studio IDE
上验证