Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2006-08-16 11:44:19


AMDG

    Insert does not work correctly for maps that have had elements erased.

typedef map2<pair<int, int>, pair<short, double> > my_map;
typedef erase_key<my_map, int>::type map_with_int_erased;
typedef insert<map_with_int_erased, pair<int, char> >::type final_map;

final_map is m_item<*2*, int, char, m_mask<int, my_map> >
This overwrites pair<short, double>. It ought to be
m_item<*3*, int, char, m_mask<int, my_map> >

Also, when insert is passed a key that is already present the old value
is still present in addition to the new value.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk