diff --git a/include/boost/mpl/map/aux_/insert_impl.hpp b/include/boost/mpl/map/aux_/insert_impl.hpp index 42232a2..fb61ed9 100644 --- a/include/boost/mpl/map/aux_/insert_impl.hpp +++ b/include/boost/mpl/map/aux_/insert_impl.hpp @@ -39,7 +39,7 @@ struct map_insert_impl > #else , m_item< - next< typename Map::size >::type::value + Map::order::value , typename Pair::first , typename Pair::second , Map diff --git a/test/map.cpp b/test/map.cpp index aaa44b8..17ad99d 100644 --- a/test/map.cpp +++ b/test/map.cpp @@ -194,3 +194,26 @@ MPL_TEST_CASE() test(); test(); } + +MPL_TEST_CASE() +{ + typedef mpl::erase_key< + mpl::map< + mpl::pair + , mpl::pair + > + , char + >::type int_to_float_map; + + typedef mpl::insert< + int_to_float_map + , mpl::pair + >::type with_char_too; + + BOOST_MPL_ASSERT(( + boost::is_same< + mpl::at::type + , long + > + )); +}