
20 Oct
2008
20 Oct
'08
11:05 a.m.
Hi, I would like to suggest an addition to Boost MPL. In the project I am working on I often need to select integral values, either using MPL or home-brew template logic. Where MPL is preferred due to consistency. This requires me to do something like: int value = if_<condition, int_<value1>, int_<value2> >::type::value; Which (when adding namespaces to the above) is too much typing in my opinion and reduces readability of my code. Would it be useful to add a new variant of if_ to Boost MPL that would enable the following? (by combining the syntax of if_ and integral_c) type value = if_integral_c<condition, type, value1, value2>::value Best regards, Roel Jordans