
19 Mar
2006
19 Mar
'06
2:51 p.m.
"Paul Mensonides"
Yeah, that won't work because the preprocessor cannot evaluate 'boost::mpl::size<TTypes>::value'. If you're going to use the preprocessor for this, you need to store the types in a preprocessor data structure, not an mpl::vector. (Note, BTW, than an MPL vector can be trivial created from a preprocessor data structure.)
If you don't want to do that, you'll have to resort to generating a chained "if" set of inline function calls containing "if" statements. Unless there are many cases, that may be as fast as a case statement. -- Dave Abrahams Boost Consulting www.boost-consulting.com