
I'm inserting the same key-value pair twice. And I'm getting a different type. The following code does not compile due to the assertion firing: #include <boost/mpl/map.hpp> #include <boost/mpl/insert.hpp> #include <boost/type_traits/is_same.hpp> typedef boost::mpl::map< boost::mpl::pair< boost::mpl::int_<0>, boost::mpl::int_<1> >, boost::mpl::pair< boost::mpl::int_<1>, boost::mpl::int_<0> >
CMyMap;
typedef boost::mpl::insert< CMyMap, boost::mpl::pair< boost::mpl::int_<2>, boost::mpl::int_<2> >
CNewMap;
int main(int, char**) { CMyMap s; CNewMap s1; BOOST_MPL_ASSERT((boost::is_same< boost::mpl::insert< CNewMap, boost::mpl::pair< boost::mpl::int_<2>, boost::mpl::int_<2> > >, CNewMap > )); return 0; }