简体   繁体   English

使全局 constexpr 变量出现在 doxygen 文档中

[英]Make global constexpr variable appear in doxygen documentation

I'm working on a C++ project that exposes a lot of global constexpr variables which form an important part of the interface.我正在处理一个 C++ 项目,该项目公开了许多构成界面重要部分的全局constexpr变量。 I've documented all of them like this我已经像这样记录了所有这些

/** Computes the absolute value of the source values.

    Complex source values are transformed into real values. Unsigned integers remain unaltered.
 */
constexpr ExpressionChainBuilder<Abs> abs;

(see here for a bit more code context). (有关更多代码上下文,请参见此处)。

Now when running doxygen, a documentation for the class declared in the same source file is rendered but no documentation for that variable.现在,当运行 doxygen 时,会呈现在同一源文件中声明的 class 的文档,但没有该变量的文档。 I've tried out some configuration options but none of them were successful so far.我已经尝试了一些配置选项,但到目前为止都没有成功。

So my simple question is: How do I make those variables appear in the rendered HTML documentation?所以我的简单问题是:如何使这些变量出现在呈现的 HTML 文档中?

The Doxygen documentation seems to have example precisely for that case. Doxygen 文档似乎恰好针对这种情况提供了示例。 You need to document \file for the document generator to have something with what to associate your global variable.您需要为文档生成器记录\file ,以便与您的全局变量相关联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM