Doxygen 不会生成独立函数的文档

ste*_*225 4 c++ doxygen

我使用的 doxygen 设置非常适合类、结构和命名空间,但不会为独立函数生成任何文档。

例如,这些方法不会生成任何内容:

#ifndef STRING_UTILS_H
#define STRING_UTILS_H 1
/// @file

/// @brief Trim whitespace from the start of the string
/// @param s - The string to left trim
/// @return the trimmed string
std::string ltrim(const std::string& s);

/// @brief Trim whitespace from the end of the string
/// @param s - The string to right trim
/// @return the trimmed string
std::string rtrim(const std::string& s);

/// @brief Trim whitespace from both sides of the string
/// @param s - The string to trim
/// @return the trimmed string
std::string trim(const std::string& s);

#endif
Run Code Online (Sandbox Code Playgroud)

ste*_*225 5

SHOW_FILESYES除了/// @file源文件中的设置外,还必须在 Doxygen 文件中设置