summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-02 17:48:18 +0000
committerAlan Conway <aconway@apache.org>2008-06-02 17:48:18 +0000
commit5e7c11ad14e6814a88074b5110383ca422db0465 (patch)
tree52f23aa61ff898bcd737f2408938939007e3cd8d /qpid/cpp
parent695b4ced14fadd0310414a3cca4b7c2bcb1aaab6 (diff)
downloadqpid-python-5e7c11ad14e6814a88074b5110383ca422db0465.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@662497 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/ptr_map.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/ptr_map.h b/qpid/cpp/src/qpid/ptr_map.h
index 92da79a2e5..6ffcd48e89 100644
--- a/qpid/cpp/src/qpid/ptr_map.h
+++ b/qpid/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