Boost logo

Boost Users :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2007-03-29 05:09:51


Hi Scott,

First of all, thanks for reporting this!

> 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?

As David has already pointed out, your code is perfectly fine; it's a
bug in the library. I'll look into fixing this within the next couple
of days.

Thanks for the report,

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

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