Author: aconway
Date: Mon Jun 2 08:26:18 2008
New Revision: 662461
URL: http://svn.apache.org/viewvc?rev=662461&view=rev
Log:
Fix compiler warning with gcc 4.3
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/ptr_map.h
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/ptr_map.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/ptr_map.h?rev=662461&r1=662460&r2=662461&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/ptr_map.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/ptr_map.h Mon Jun 2 08:26:18 2008
@@ -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 @@
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