3 Oct
2007
3 Oct
'07
12:32 a.m.
on Tue Oct 02 2007, Josh Brown
I'm using the preprocessor lib to generate a class definition from a sequence of sequences. I want to be able to make the last element of each sequence optional and generate additional code based on if the last parameter exists. I'm currently testing for the length of the sequence in a BOOST_PP_IF statement to see if it has the optional last parameter. The problem is that both the true and false result expressions are being expanded and then the correct one is selected
The simplest way to deal with that problem might be to have the IF macro select one of two function-like macro *names*, and then invoke the one that's selected. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com