
7 Dec
2009
7 Dec
'09
9:30 a.m.
2009/12/6 Christian Henning
Hi there,
let's assume I have a structure which takes 5 ints as template parameters.
template< int NumChannel , int FirstChannelBits = 0 , int SecondChannelBits = 0 , int ThirdChannelBits = 0 , int FourthChannelBits = 0 , int FifthChannelBits = 0 > struct pixel_type_generator { /* omitted*/ }
The first parameter is different as it defines how many of the other parameters are actually used.
How can I use boost::preprocessor to get this kind of code repetition:
<cut> FWIW, this can be achieved with Boost.MPL instead of preprocessor. Roman Perepelitsa.