请不要介意以下最小例子的陌生感(我必须把它做得更大才能证明我为什么这样做):
文件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.第二个是如果删除了任何一条注释行,警告就会消失.这里发生了什么?