choosing from a list of types based on a runtime value

6 Mar
2009
6 Mar
'09
4:29 p.m.
say I have a template <typename Tag> // Tag should be 1 in 10 types struct S { ... }; in a function f(int Tag) // Tag is computed here at runtime { switch(Tag) { case 0: // use S<Tag0> ... case 9: // use S<Tag9> } } Is fusion the lib to help with problems like this, so I don't need to write the full switch case for all types, regards,
5833
Age (days ago)
5833
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hicham Mouline