boostorg / boostorg/preprocessor

Minor feature request: BOOST_PP_IGNORE or update docs for BOOST_PP_EMPTY

オープン
#45 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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(...) が言及されている boost/vmd/empty.hpp とその制限を比較してください。シグネチャの制約の背景については #34 を読んでください。BOOST_PP_EMPTY のリファレンスで代替手段を文書化するか、要求された BOOST_PP_IGNORE(...) の動作を追加し、選択したアプローチを明確に扱えば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
compilers
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。