氧无法解析模板化的返回类型

Doxygen fails to parse templated return type

本文关键字:返回类型      更新时间:2023-10-16

我目前正在用氧气记录我的代码。看起来好像氧不能处理模板化的返回值。我的问题:

/** 
 *  Retrieves all edges from the graph.
 *  @param gID The ID of the graph.
 *  @return A list containing pairs of vertices, denoting the edges in the graph.
 */
 int GetEdges(const int& gID); // Works fine
/** 
 *  Retrieves all edges from the graph.
 *  @param gID The ID of the graph.
 *  @return A list containing pairs of vertices, denoting the edges in the graph.
 */
 list<pair<int,int>> GetEdges(const int& gID); // PROBLEM

第二个函数没有文档化。更糟糕的是;它下面的所有功能现在都被氧跳过了。不知何故,氧似乎无法处理list<pair<int,int>>的返回值。

有人知道为什么和如何改变这一点吗?

也许氧不支持声明模板的新方式?较旧的c++标准(我认为直到c++ 03)只允许list<pair<int,int> >。在两个>符号之间应该有一个空格,否则编译器会将它们解释为>>(右移)操作符。

一些较新的编译器识别这种语法,它是即将到来的c++ 0x标准的一部分,但也许氧还没有识别它。