Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-03-19 09:51:35


"Paul Mensonides" <pmenso57_at_[hidden]> writes:

> 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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net