Opened 14 years ago

Closed 13 years ago

#2047 closed Feature Requests (invalid)

[preprocessor] Support for enumerating through empty sequences

Reported by: andysem@… 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 Marshall Clow, 14 years ago

Component: Nonepreprocessor
Milestone: Boost 1.36.0To Be Determined
Owner: set to No-Maintainer

comment:2 by Steven Watanabe, 13 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.