Boost logo

Boost :

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

How can I make a macro which, given an integer N, generates a sequence
N concatenated Xs?


    Xs(0) ->
    Xs(5) -> XXXXX

...and so forth?

Fortunately, in my case I need a string literal so I don't actually need
to catenate them (I can rely on "X" "X" "X" to generate "XXX") but the
problem still looks unreasonably hard-to-solve with BPPL.


                  David Abrahams
      C++ Booster ( O__ ==
      Pythonista ( c/ /'_ ==
  resume: (*) \(*) ==
          email: david.abrahams_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at