boostorg / boostorg/preprocessor
Minor feature request: BOOST_PP_IGNORE or update docs for BOOST_PP_EMPTY
- 主要语言
- C++
- 星标
- 118
- 派生
- 76
- PR 合并指标
- 30 天内没有已合并 PR
描述
The current `BOOST_PP_EMPTY()` is not variadic, so its usefulness in `BOOST_PP_IF()` and the like is limited to when there are no arguments/params in the resultant call.
For example, this doesn't work:
```
#define X(a, b) result(a, b)
#define MACRO(a, b, c) BOOST_PP_IF(c, X, BOOST_PP_EMPTY)(a, b)
```
As explained in #34, changing the signature of `BOOST_PP_EMPTY()` is impractical, and another solution exists: `BOOST_VMD_EMPTY(...)` in `boost/vmd/empty.hpp`.
So this is a very minor issue, but it would be nice if either:
1. There were a `BOOST_PP_IGNORE(...)` to do this, or...
2. The reference docs for the `BOOST_PP_EMPTY` could also point to the VMD macro to use instead.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 BOOST_PP_EMPTY 参考文档开始,并将其限制与 boost/vmd/empty.hpp 进行比较,后者提到了 BOOST_VMD_EMPTY(...) 这一现有替代方案。阅读 #34,了解签名约束背后的上下文。完成标准是:要么在 BOOST_PP_EMPTY 参考文档中记录该替代方案,要么添加所请求的 BOOST_PP_IGNORE(...) 行为,并且明确涵盖所选择的方法。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- compilers
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100