boostorg / boostorg/preprocessor
Minor feature request: BOOST_PP_IGNORE or update docs for BOOST_PP_EMPTY
- Lingua principale
- C++
- Stelle
- 118
- Fork
- 76
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start with the BOOST_PP_EMPTY reference documentation and compare its limitations with boost/vmd/empty.hpp, where BOOST_VMD_EMPTY(...) is mentioned as an existing alternative. Read #34 for the context behind the signature constraint. Done means either documenting the alternative in the BOOST_PP_EMPTY reference or adding the requested BOOST_PP_IGNORE(...) behavior, with the chosen approach clearly covered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- compilers
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100