
Adrián Etchevarne ha escrito:
Problem: How can I get a tuple type from a tuples::cons<> list ? example: given the type: cons
> > obtain tuple
Real problem: I need to insert a type T at the beginning of a tuple, how I can do this?
example given the type T and tuple
, obtain a tuple Thanks in advance, Adrián
Hi Adrián, I think you've got to resort to brute force, although Boost.PP helps a lot with this kind of tasks. Please find attached a possible implementation of a tuple_from_cons helper metafunction, though I'm sure the PP experts out there could come out with simpler and nicer formulations. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo ___________________________________________________________________________ Antes de imprimir este mensaje, asegúrese de que es necesario. La mejora del medio ambiente empieza en nuestro día a día. ___________________________________________________________________________