相关疑难解决方法(0)

Doxygen要求记录包含防守

请不要介意以下最小例子的陌生感(我必须把它做得更大才能证明我为什么这样做):

文件test.cpp:

#include "a.h"

int main() {
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

档案啊:

namespace N { // without namespace all is well!
#include "b.h"
}
Run Code Online (Sandbox Code Playgroud)

文件bh:

/// \file

#ifndef GUARD
#define GUARD

struct A {};
#define CMD 5 // without this, all is well!

#endif
Run Code Online (Sandbox Code Playgroud)

Doxygen 1.8.11抱怨:

warning: Member GUARD (macro definition) of file a.h is not documented.
Run Code Online (Sandbox Code Playgroud)

第一个有趣的事情是警告提到a.h.第二个是如果删除了任何一条注释行,警告就会消失.这里发生了什么?

c++ doxygen include-guards

5
推荐指数
1
解决办法
313
查看次数

标签 统计

c++ ×1

doxygen ×1

include-guards ×1