Opened 14 years ago
Closed 13 years ago
#2047 closed Feature Requests (invalid)
[preprocessor] Support for enumerating through empty sequences
Reported by: | Owned by: | No-Maintainer | |
---|---|---|---|
Milestone: | To Be Determined | Component: | preprocessor |
Version: | Boost Development Trunk | Severity: | Not Applicable |
Keywords: | preprocessor seq enumeration | Cc: |
Description
Currently it is not easy to enumerate through a preprocessor sequence that may be empty. Currently, attempting to use BOOST_PP_SEQ_ENUM on an empty sequence (BOOST_PP_SEQ_NIL, for example) results in a compilation error saying that BOOST_PP_SEQ_ENUM_0 is not defined.
Support for empty sequences is very useful, for example, when one wants to expand a sequence into function call arguments with possibility to call the function with no arguments.
It seems, it is trivial to support this feature by adding "#define BOOST_PP_SEQ_ENUM_0" in "boost/preprocessor/seq/enum.hpp".
Change History (2)
comment:1 by , 14 years ago
Component: | None → preprocessor |
---|---|
Milestone: | Boost 1.36.0 → To Be Determined |
Owner: | set to |
comment:2 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
There is no such thing as an empty seq. See http://www.boost.org/libs/preprocessor/doc/data/sequences.html and http://www.boost.org/libs/preprocessor/doc/ref/seq_nil.html