Recommended Posts

hello.
I wish create a complex structure that is the sum of some other structure.
For do this i wish combine some structure with templates.
for example:
I wish create a vertex buffer , that is the combination of a CPosition, a CNormal and a CColor structures.
the result must works like:
CPosition pos;
vect4f pos;
pos.add(pos)
ecc...
like
CNormal nor;
.
.
CColor col;
.
CVertexBuffer<CPosition, CNormal, CColor>(pos, nor, col);
but the templates don't supports n arguments.
How i can insert n types and n params in a template?
1)I Can add 16 or 1345353458 parameters with default value.
2)i can use the template recursion to generate a list of parameters of any size