"Peter Foelsche" 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
struct compare
{ typedef typename boost::mpl::less<
typename T0::first,
typename T1::first
::type type;
};
template
struct insert1
{ typedef typename boost::mpl::key_type
::type VECTOR;
typedef typename boost::mpl::sort<
typename boost::mpl::push_back<
VECTOR,
VALUE
::type,
compare
::type SORTED;
typedef typename boost::mpl::accumulate<
SORTED,
boost::mpl::map<>,
boost::mpl::insert
::type type;
};