----- Original Message ----- From: "JOAQUIN M. LOPEZ MUĂ‘OZ" joaquin@tid.es ________________________________________ De: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] En nombre de vicente.botet [vicente.botet@wanadoo.fr] Asunto: [Boost-users] [preporcessor]Can we use BOOST_PP_SEQ_FOLD_LEFT onsequences with one element?
I'm a beginer with the preprocessor library. My goal is to generate from a sequence (a)(b)(c) => a::b::c and from (a) => a
[...]
BOOST_PP_SEQ_FOLD_LEFT(NAME, BOOST_PP_SEQ_HEAD((a)), BOOST_PP_SEQ_TAIL((a)))
Here lies the problem: (a) does not have a tail (there is no such thing as
an empty PP sequence, unfortunately). I'm afraid you'll have to treat
sequences
of size 1 separately from the general case.
--
Thanks Joaquin,
the question now is how to treat sequences of size 1 separately from the
general case.
I have tried with BOOST_PP_IF, but it is no better.
#include