diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/ptr_map.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/ptr_map.h b/cpp/src/qpid/ptr_map.h index 92da79a2e5..f34c3271b3 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 { @@ -49,7 +50,10 @@ 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 +struct PtrMapValueType : public boost::remove_const<typename Iter::value_type::second_type> {}; + +template <class Iter> +typename boost::disable_if<IsOldPtrMap, typename PtrMapValueType<Iter>::type >::type ptr_map_ptr(const Iter& i) { return i->second; } } // namespace qpid |