
14 May
2012
14 May
'12
4:36 p.m.
On Mon, May 14, 2012 at 8:47 AM, Nathan Ridge <zeratul976@hotmail.com>wrote:
Is there any difference between boost::type_traits::ice_and (ice_or) and boost::mpl::and_ (or_)?
boost::type_traits::ice_and takes bools, boost::mpl::and_ takes types.
Sure. But you can always call ::value on the type to get a bool, or wrap the bool in mpl::bool_<> to get a type.
Does it really make sense to have two facilities that basically do the same thing?
mpl::and_/or_ are convenient when you want/need laziness. I'd imagine you'd use ice_and/or in preference to wrapping bools with mpl::bool_ if you wanted less verbosity (and in preference to just using the standard C++ operators &&/|| if you wanted more portability?). - Jeff