The fix is based on the report of Ticket 8749 itself:
I have traced the problem to the file boost/mpl/map/aux_/item.hpp in the class definition of m_item. m_item derives from Base (which is a map<...> type) but does not define a "typedef m_item type;" to act as a unary metafunction returning itself. The result is that Base::type is found instead which means that m_item acts as a unary metafunction returning a map with all the inserted elements removed. The class mitem at the bottom of the file properly defines a "typedef mitem type;" which strengthens my belief that it missing from m_item is a bug.
Originally Tickets 7975 and 8749 referred only to insertion of keys into maps, but the very same bug can be reproduced for sets as well. Moreover, the removal of keys from both also suffers of the same bug. This changes fix all these issues.
The fix is based on the report of Ticket 8749 itself:
Originally Tickets 7975 and 8749 referred only to insertion of keys into maps, but the very same bug can be reproduced for sets as well. Moreover, the removal of keys from both also suffers of the same bug. This changes fix all these issues.