map insert does not work after an erase in the non-typeof implementation
This test case fails.
#include <boost/mpl/map.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/insert.hpp>
#include <boost/mpl/pair.hpp>
#include <boost/mpl/erase_key.hpp>
#include <boost/mpl/at.hpp>
#include <boost/type_traits/is_same.hpp>
using namespace boost::mpl;
typedef erase_key<
insert<
insert<map0<>, pair<char, double> >::type,
pair<int, float>
>::type,
char
>::type int_to_float_map;
typedef insert<int_to_float_map, pair<char, long> >::type with_char_too;
BOOST_MPL_ASSERT((boost::is_same<at<with_char_too, char>::type, long>));
The attached patch fixes the problem.
(In [55727]) Use order instead of size to find the next order in the non-typeof implementation of mpl::insert for mpl::map. Fixes #2042.