Boost logo

Boost Users :

From: Scott Meyers (usenet_at_[hidden])
Date: 2007-03-22 02:30:53


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net