Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-11 19:34:27


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" ""

+---------------------------------------------------------------+
                  David Abrahams
      C++ Booster (http://www.boost.org) O__ ==
      Pythonista (http://www.python.org) c/ /'_ ==
  resume: http://users.rcn.com/abrahams/resume.html (*) \(*) ==
          email: david.abrahams_at_[hidden]
+---------------------------------------------------------------+


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk