[Boost-bugs] [Boost C++ Libraries] #2042: map insert does not work after an erase in the non-typeof implementation

Subject: [Boost-bugs] [Boost C++ Libraries] #2042: map insert does not work after an erase in the non-typeof implementation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-06-24 03:25:33


#2042: map insert does not work after an erase in the non-typeof implementation
-----------------------------+----------------------------------------------
 Reporter: steven_watanabe | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: None
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
-----------------------------+----------------------------------------------
 This test case fails.

 {{{

 #include <boost/mpl/map.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/insert.hpp>
 #include <boost/mpl/pair.hpp>
 #include <boost/mpl/erase_key.hpp>
 #include <boost/mpl/at.hpp>
 #include <boost/type_traits/is_same.hpp>

 using namespace boost::mpl;

 typedef erase_key<
   insert<
     insert<map0<>, pair<char, double> >::type,
     pair<int, float>
>::type,
   char
>::type int_to_float_map;

 typedef insert<int_to_float_map, pair<char, long> >::type with_char_too;

 BOOST_MPL_ASSERT((boost::is_same<at<with_char_too, char>::type, long>));

 }}}

 The attached patch fixes the problem.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2042>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC