21 Jan
2005
21 Jan
'05
8:44 a.m.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Paul Mensonides
#include
#define index(z, n, _) n
unsigned char tmp[256] = { BOOST_PP_ENUM(256, index, ~) };
#undef index
(Note, however, that you can't go any higher than 256 repetitions.)
More specifically, the library cannot _directly_ generate more than 256 repetitions in one pass. You can do something like this, for example: #define index(z, n, offset) n + offset unsigned char tmp[512] = { BOOST_PP_ENUM(256, index, 0), BOOST_PP_ENUM(256, index, 256) }; #undef index Regards, Paul Mensonides