From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-04-11 20:01:20
David Abrahams wrote:
> I'd like to have some simple SELECT_<N>_OF_<M> macros for use with
> macros like BOOST_PP_REPEAT:
> #define SELECT_1_OF_2(I,P) I
> #define SELECT_2_OF_2(I,P) P
> #define Xs(N) BOOST_PP_REPEAT(N,SELECT_2_OF_2,"X") ""
> Xs(3) -> "X" "X" "X" ""
MPL calls these BOOST_MPL_PP_PROJECT1ST and BOOST_MPL_PP_PROJECT2ND (taking
the STL terminology). See "mpl/aux_/preprocessor/project1st.hpp".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk