diff options
author | Alan Conway <aconway@apache.org> | 2008-06-02 17:48:18 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-06-02 17:48:18 +0000 |
commit | 1322ce3cf402f3bb74c2a411dcbdfd3779ed6d3b (patch) | |
tree | 8d453221d167a9686dbc87a9d57cfdaa0ebb3378 /cpp/src | |
parent | 5ecaaf7bb68207a2f547dc998de75800c9d4622d (diff) | |
download | qpid-python-1322ce3cf402f3bb74c2a411dcbdfd3779ed6d3b.tar.gz |
Fix that works on 1.33/gcc4.1 up to boost 1.34.13/gcc 4.3
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@662497 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/ptr_map.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/ptr_map.h b/cpp/src/qpid/ptr_map.h index 92da79a2e5..6ffcd48e89 100644 --- a/cpp/src/qpid/ptr_map.h +++ b/cpp/src/qpid/ptr_map.h @@ -25,6 +25,7 @@ #include <boost/ptr_container/ptr_map.hpp> #include <boost/utility/enable_if.hpp> #include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_const.hpp> namespace qpid { @@ -35,21 +36,20 @@ namespace qpid { * iterators should use ptr_map_ptr(i) to get the pointer from * boost::ptr_map::iterator i. * - * Can be removed when we no longer support platforms on 1.33. - * * @see http://www.boost.org/libs/ptr_container/doc/ptr_container.html#upgrading-from-boost-v-1-33 */ -typedef boost::is_same<boost::ptr_map<int, int>::iterator::value_type, - int> IsOldPtrMap; +typedef boost::is_same<boost::ptr_map<int, int>::iterator::value_type, int> IsOldPtrMap; template <class Iter> typename boost::enable_if<IsOldPtrMap, typename Iter::value_type*>::type ptr_map_ptr(const Iter& i) { return &*i; } template <class Iter> -typename boost::disable_if<IsOldPtrMap, typename Iter::value_type::second_type>::type +typename boost::disable_if<IsOldPtrMap, + typename boost::remove_const<typename Iter::value_type::second_type>::type + >::type ptr_map_ptr(const Iter& i) { return i->second; } } // namespace qpid |