
"Peter Foelsche" <foelsche@sbcglobal.net> wrote in message news:im65n2$u72$1@dough.gmane.org... I wrote my own insert to overcome this problem. Extracting the elements, sorting them and then inserting them back. I think this should either be fixed or documented. Or maybe there should be some option to enable what I want to do. (Stupid "smart" formating coming from Windows Mail -- functionality to destroy all formating) template<typename T0, typename T1> struct compare { typedef typename boost::mpl::less< typename T0::first, typename T1::first
::type type;
}; template<typename MAP, typename VALUE> struct insert1 { typedef typename boost::mpl::key_type<MAP, VALUE>::type KEY; typedef typename boost::mpl::erase_key<MAP, KEY>::type MAP1; typedef typename boost::mpl::accumulate< MAP1, boost::mpl::vector<>, boost::mpl::push_back<boost::mpl::_1, boost::mpl::_2>
::type VECTOR;
typedef typename boost::mpl::sort< typename boost::mpl::push_back< VECTOR, VALUE
::type,
compare<boost::mpl::_1, boost::mpl::_2>
::type SORTED;
typedef typename boost::mpl::accumulate< SORTED, boost::mpl::map<>, boost::mpl::insert<boost::mpl::_1, boost::mpl::_2>
::type type;
};