|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-08-16 12:12:11
Steven Watanabe <steven_at_[hidden]> writes:
> 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.
Are you testing the Boost CVS, RC_1_34_0, or the 1.33.1 release? We
have fixed lots of map bugs.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk