
16 Mar
2009
16 Mar
'09
4:06 p.m.
Hello, I have a templated function Engine, that takes 3 template arguments, these are tags T1, T2, T3, T4. I have an typedef enum { e1, e2, e3, e4 } E to element ei corresponds the type Ti ... const E e // switch (e) { case e1: Engine< Metafct1<T1>::type, Metafct2<T1>::type, Metafct3<T1>::type >::Process( .... ); break; case e2: Engine< Metafct1<T2>::type, Metafct2<T2>::type, Metafct3<T2>::type >::Process( .... ); break; ... } Is there a shorter way of writing this... For now I only have 4 in the enum, but I may have more later? regards,