Ticket #9440: intrusive_gcc47_drops_qualifiers.patch
File intrusive_gcc47_drops_qualifiers.patch, 5.3 KB (added by , 9 years ago) |
---|
-
boost/intrusive/pointer_traits.hpp
a b 257 257 { return dynamic_cast<pointer>(uptr); } 258 258 }; 259 259 260 } //namespace container { 260 namespace detail { 261 262 // NOTE: These functions help to alleviate a GCC 4.7.2 bug on Debian Wheezy, when the compiler instantiates 263 // pointer_traits on an incorrect pointer type. The compiler looses const qualifier from the element type 264 // of the pointer (i.e. it instantiates pointer_traits<foo*> instead of pointer_traits<const foo*>). 265 template< typename To, typename From > 266 inline To static_cast_ptr(From const& p) 267 { 268 return pointer_traits< To >::static_cast_from(p); 269 } 270 271 template< typename To, typename From > 272 inline To const_cast_ptr(From const& p) 273 { 274 return pointer_traits< To >::const_cast_from(p); 275 } 276 277 template< typename To, typename From > 278 inline To dynamic_cast_ptr(From const& p) 279 { 280 return pointer_traits< To >::dynamic_cast_from(p); 281 } 282 283 template< typename Ptr > 284 inline typename pointer_traits< Ptr >::pointer pointer_to(typename pointer_traits< Ptr >::reference obj) 285 { 286 return pointer_traits< Ptr >::pointer_to(obj); 287 } 288 289 } //namespace detail { 290 } //namespace intrusive { 261 291 } //namespace boost { 262 292 263 293 #include <boost/intrusive/detail/config_end.hpp> -
boost/intrusive/detail/list_node.hpp
a b 109 109 { members_.nodeptr_ = node; return static_cast<list_iterator&>(*this); } 110 110 111 111 const_real_value_traits_ptr get_real_value_traits() const 112 { return pointer_traits<const_real_value_traits_ptr>::static_cast_from(members_.get_ptr());}112 { return boost::intrusive::detail::static_cast_ptr<const_real_value_traits_ptr>(members_.get_ptr()); } 113 113 114 114 public: 115 115 list_iterator& operator++() -
boost/intrusive/detail/slist_node.hpp
a b 98 98 { members_.nodeptr_ = node; return static_cast<slist_iterator&>(*this); } 99 99 100 100 const_real_value_traits_ptr get_real_value_traits() const 101 { return pointer_traits<const_real_value_traits_ptr>::static_cast_from(members_.get_ptr()); }101 { return boost::intrusive::detail::static_cast_ptr<const_real_value_traits_ptr>(members_.get_ptr()); } 102 102 103 103 public: 104 104 slist_iterator& operator++() -
boost/intrusive/detail/tree_node.hpp
a b 165 165 166 166 const_real_value_traits_ptr get_real_value_traits() const 167 167 { 168 return pointer_traits<const_real_value_traits_ptr>::static_cast_from(members_.get_ptr());168 return boost::intrusive::detail::static_cast_ptr<const_real_value_traits_ptr>(members_.get_ptr()); 169 169 } 170 170 171 171 tree_iterator end_iterator_from_it() const -
boost/intrusive/list.hpp
a b 180 180 typedef typename pointer_traits<node_ptr>::template rebind_pointer<real_value_traits const>::type const_real_value_traits_ptr; 181 181 182 182 const_real_value_traits_ptr real_value_traits_ptr() const 183 { return pointer_traits<const_real_value_traits_ptr>::pointer_to(this->get_real_value_traits()); }183 { return boost::intrusive::detail::pointer_to<const_real_value_traits_ptr>(this->get_real_value_traits()); } 184 184 185 185 //! <b>Effects</b>: constructs an empty list. 186 186 //! -
boost/intrusive/slist.hpp
a b 271 271 typedef typename pointer_traits<node_ptr>::template rebind_pointer<const real_value_traits>::type const_real_value_traits_ptr; 272 272 273 273 const_real_value_traits_ptr real_value_traits_ptr() const 274 { return pointer_traits<const_real_value_traits_ptr>::pointer_to(this->get_real_value_traits()); }274 { return boost::intrusive::detail::pointer_to<const_real_value_traits_ptr>(this->get_real_value_traits()); } 275 275 276 276 public: 277 277 -
boost/intrusive/bstree.hpp
a b 103 103 typedef typename pointer_traits<node_ptr>::template rebind_pointer<const real_value_traits>::type const_real_value_traits_ptr; 104 104 105 105 const_real_value_traits_ptr real_value_traits_ptr() const 106 { return pointer_traits<const_real_value_traits_ptr>::pointer_to(this->get_real_value_traits()); }106 { return boost::intrusive::detail::pointer_to<const_real_value_traits_ptr>(this->get_real_value_traits()); } 107 107 108 108 109 109 typedef tree_iterator<real_value_traits, false> iterator; -
boost/intrusive/hashtable.hpp
a b 557 557 template rebind_pointer<const real_value_traits>::type const_real_value_traits_ptr; 558 558 559 559 const_real_value_traits_ptr real_value_traits_ptr() const 560 { return pointer_traits<const_real_value_traits_ptr>::pointer_to(this->priv_real_value_traits()); }560 { return boost::intrusive::detail::pointer_to<const_real_value_traits_ptr>(this->priv_real_value_traits()); } 561 561 562 562 //real_bucket_traits 563 563 //