Opened 10 years ago

Closed 7 years ago

#8413 closed Patches (fixed)

BOOST_PP_SEQ_SIZE

Reported by: anonymous Owned by: No-Maintainer
Milestone: To Be Determined Component: preprocessor
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

I needed to use a sequence ( var1a , var1b )( var2a , var2b )

BOOST_PP_SEQ_SIZE would give incorrect number of parameters

I changed all the BOOST_PP_SEQ_SIZE_xxx definitations from BOOST_PP_SEQ_SIZE_0( _ ) to

#define BOOST_PP_SEQ_SIZE_0( ... ) BOOST_PP_SEQ_SIZE_1

solved the problem and makes the sequences more usefull.

Change History (3)

comment:1 by viboes, 10 years ago

Component: Nonepreprocessor
Owner: set to No-Maintainer

comment:2 by Edward Diener, 7 years ago

The notation:

( var1a , var1b )( var2a , var2b ) 

is not a Boost PP sequence. Each element of a Boost PP sequence must be a single-element tuple.

Therefore applying BOOST_PP_SEQ_SIZE to such syntax is undefined behavior.

comment:3 by Edward Diener, 7 years ago

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