Index: boost/range/adaptor/map.hpp =================================================================== --- boost/range/adaptor/map.hpp (revision 66808) +++ boost/range/adaptor/map.hpp (working copy) @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { @@ -25,11 +26,11 @@ template< class Map > struct select_first { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::first_type& + typedef BOOST_DEDUCED_TYPENAME range_reference::type reference; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::first_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( reference r ) const { return r.first; } @@ -38,10 +39,11 @@ template< class Map > struct select_second_mutable { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef BOOST_DEDUCED_TYPENAME pair_t::second_type& result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type reference; + typedef BOOST_DEDUCED_TYPENAME range_value::type::second_type& + result_type; - result_type operator()( pair_t& r ) const + result_type operator()( reference r ) const { return r.second; } @@ -50,11 +52,11 @@ template< class Map > struct select_second_const { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::second_type& + typedef BOOST_DEDUCED_TYPENAME range_reference::type reference; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::second_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( reference r ) const { return r.second; }