问题
The behavior of Doxygen 1.8.11 for the following example is really bizarre:
File test.h
:
/// \file
/// \namespace N1
/// Namespace N1.
namespace N1 {
#include "a.h"
} // namespace
int main() {
return 0;
}
File a.h
:
/// \file
/// \namespace N1::N2
/// Namespace N2
namespace N2 {
#include "b.h"
} // namespace
File b.h
:
/// \file
// class A does not appear without the commented Doxygen comments below!
// /// \cond None
#ifndef GUARD
#define GUARD
// /// \endcond
/// Class A
class A {};
// /// \cond None
#endif
// /// \endcond
The class A
appears in the documentation of N1::N2
only if the include-guard in b.h
is not present or is conditioned out. Interestingly, even having the conditioning comments commented out as in the example suffices to have the class A
appear!
来源:https://stackoverflow.com/questions/40386042/include-guards-and-commented-out-doxygen-comments-affect-the-output-of-doxygen