Opened 12 years ago

Closed 7 years ago

#4446 closed Patches (fixed)

complete BOOST_PP_SEQ_TO_TUPLE

Reported by: Wolf Lammen <ookami1@…> Owned by: No-Maintainer
Milestone: Boost 1.44.0 Component: preprocessor
Version: Boost 1.44.0 Severity: Cosmetic
Keywords: Cc:

Description

Feature completion, symmetric behavior:

While BOOST_PP_TUPLE_TO_SEQ turns an empty tuple () into an empty sequence (i.e. nothing), the reverse operation BOOST_PP_SEQ_TO_TUPLE cannot turn an empty sequence to (). The attached patch fixes this, and, as a side effect, extends BOOST_PP_SEQ_ENUM to accept empty sequences as well.

Cheers,

Wolf Lammen

Attachments (1)

seq_enum.patch (989 bytes ) - added by Wolf Lammen <ookami1@…> 12 years ago.

Download all attachments as: .zip

Change History (3)

by Wolf Lammen <ookami1@…>, 12 years ago

Attachment: seq_enum.patch added

comment:1 by Edward Diener, 7 years ago

There is no such thing as an empty tuple or an empty seq. A tuple of '()' is a one element tuple whose data is empty. A seq of '()' is a seq of a single element whose data is empty. Converting between a seq and a tuple now works each way to produce the correct result.

comment:2 by Edward Diener, 7 years ago

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