Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-14 10:27:22


Vladimir Prus <ghost_at_[hidden]> writes:

> Hello,
> support I have some Boost.Preprocessor data structure, say a sequence:
>
> #define SEQ ("1")("2")("3")
>
> how can I convert it into initalizer {"1", "2", "3"}? E.g:
>
> #define MY_TEST(SEQ) char* var = { SOMEHOW_GET_LIST_OF_VALUES(SEQ) }
>
> I've tried to look at preprocessor docs, but it's rather hard to find the
> answer.

Yeah, they are hard to read.
Why not look at the PP appendix of "C++ Template Metaprogramming"?
http://www.boost-consulting.com/mplbook

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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