On 8/13/2010 6:46 PM, OvermindDL1 wrote:
On Fri, Aug 13, 2010 at 2:27 PM, Kenny Riddile
wrote: Say I have an array:
ArgumentType arguments[ argumentCount ];
where argumentCount is a size_t template parameter.
I would like to generate, at compile time, a comma-delimited list of the form:
arguments[0], arguments[1], arguments[2], ...arguments[argumentCount-1]
Can this be accomplished using Boost.Preprocessor or by some other method?
It 'could' be done using the preprocessor, but you would have to encode the size at the call site since the preprocessor knows nothing of the C type system.
If you can get the arguments type to be boost::array or fusion::vector or so, then fusion::invoke would be perfect if you are needing to call something with them.
Thanks, that was EXACTLY what I was looking for...someday I'll know everything that's available in Boost :)