Minor feature request: BOOST_PP_IGNORE or update docs for BOOST_PP_EMPTY

未关闭
#45 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
compilers

调研方向

从 BOOST_PP_EMPTY 参考文档开始,并将其限制与 boost/vmd/empty.hpp 进行比较,后者提到了 BOOST_VMD_EMPTY(...) 这一现有替代方案。阅读 #34,了解签名约束背后的上下文。完成标准是:要么在 BOOST_PP_EMPTY 参考文档中记录该替代方案,要么添加所请求的 BOOST_PP_IGNORE(...) 行为,并且明确涵盖所选择的方法。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
C++
星标
118
派生
76
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/preprocessor 的其他 Issue

查看 boostorg/preprocessor 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。