有人知道一个类似的库吗 boost::preprocessor (也许不是那么先进)可以轻松使用/合并在普通C项目中?当然,最(全部?) boost::preprocessor 在写作时可用 C 但是,我更喜欢一个只有基本功能的小库,而基本功能不取决于怪物。

有帮助吗?

解决方案

我建议您使用boost.preprocessor。不要以为我还没有完全阅读您的问题。我建议您仅使用boost.prepropessor,而不是整个Boost包。为此,您可以使用一个称为的小型实用程序 BCP 在您的情况下,您可以提取所需的库。

其他提示

您始终可以使用提取组件来提取组件 BCP, 不过,老实说,我还没有用boost.preprocessor对此进行测试。
我认为您将很难找到其他像Boost一样便携的实现。

P99 (http://p99.gforge.inria.fr/) comes to mind.

Quote:

P99 is a suite of macro and function definitions that ease the programming in modern C, aka > C99. By using new tools from C99 we implement default arguments for functions, scope bound > resource management, transparent allocation and initialization, ...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top