
22 Mar
2007
22 Mar
'07
12:30 a.m.
I expect the following code to compile cleanly. It does not. #include <boost/mpl/set.hpp> #include <boost/mpl/equal.hpp> #include <boost/mpl/erase_key.hpp> namespace mpl = boost::mpl; using mpl::_1; using mpl::_2; struct A {}; struct B {}; typedef mpl::set<A, B> set1; typedef mpl::set<B, A> set2; BOOST_MPL_ASSERT(( mpl::equal< mpl::erase_key<set1, A>::type, mpl::erase_key<set2, A>::type
)); I'm simply trying to assert that the sets {A,B} and {B,A} have the same elements after A has been removed from both. What am I doing wrong? Thanks, Scott