
30 Sep
2008
30 Sep
'08
12:52 p.m.
I have two vectors (CDB and CDB1) containing boolean. I want to make certain that if a bit in the second vector is set, it must also be set in the first vector. template<typename CDB, typename CDB1> struct CTargetEqualOrGreater { static const bool value = boost::mpl::deref< boost::mpl::max_element< boost::mpl::transform< CDB, CDB1, boost::mpl::not_< boost::mpl::or_< boost::mpl::and_< boost::mpl::not_<boost::mpl::_1>, boost::mpl::not_<boost::mpl::_2> >, boost::mpl::_1 > > > > >::type::value == 0; }; ... BOOST_MPL_ASSERT( (CTargetEqualOrGreater<CDB, CDB1>::value)); But this does not compile.