id summary reporter owner description type status milestone component version severity resolution keywords cc 7423 std::map::erase returns iterator in C++11 mode instead of void, should be handled properly Andrei Elovikov Kohei Takahashi "The issue is with the following code: boost/phoenix/stl/container.hpp, line 284 {{{ namespace result_of { template struct erase { // BOOST_MSVC #if branch here in map_erase_result non- // standard behavior. The return type should be void but // VC7.1 prefers to return iterator_of. As a result, // VC7.1 complains of error C2562: // boost::phoenix::stl::erase::operator() 'void' function // returning a value. Oh well... :* typedef boost::mpl::eval_if_c< boost::is_same< typename remove_reference::type , typename iterator_of::type >::value #if defined(BOOST_MSVC)// && (BOOST_MSVC <= 1500) , iterator_of #else , boost::mpl::identity #endif , size_type_of > map_erase_result; typedef typename boost::mpl::eval_if_c< has_mapped_type::value , map_erase_result , iterator_of >::type type; }; } }}} It seems that MSVC's behaviour becomes the standard one with C++11. Also the current check seems to be done incorrectly because Intel Compiler uses MSVC's stl library on Windows, so checking for _MSC_VER will be more appropriate, I think." Bugs closed Boost 1.65.0 phoenix Boost 1.52.0 Problem fixed