
24 Aug
2009
24 Aug
'09
3:37 p.m.
Ion GaztaƱaga wrote:
Thanks for the comments!
No problem.
- Make all metafunctions true MPL metafunctions (as mentioned in previous postings).
Ok, but I would like to avoid any header dependency with MPL so that library is minimal.
That's fair, though as noted by others, all you need to do us add a nested type typedef which has a nested value constant, which (I think) can even be the metafunction class itself. You'd still keep the value bool constant in the original class as well. Example (not 100% sure this is correct): template< class T > struct metaf { // Or use BOOST_STATIC_CONSTANT( ... ) ? static const bool value = ...; typedef metaf type; }; - Jeff