
Paul Mensonides wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Tobias Schwinger
Thank you for this very detailed reply !
Is it safe to use BOOST_PP_EMTPY or BOOST_PP_INDENTITY(somthing) as the element and "dereference" with '()' ?
Sure, provided that the result is never "bound" to an argument by itself. E.g.
#define A(x) B(x) #define B(x) x
A() // undefined: empty argument to A
A( BOOST_PP_EMPTY() ) // undefined: empty argument to B
A( BOOST_PP_EMPTY )() // okay ^^^
This is about what I meant (well, BOOST_PP_SEQ_ELEM(x,s)() - x being the index of the "optional element" in a sequence). But according to the source of SEQ_ELEM this should work as well. Thanx, again. Regards, Tobias