diff -ru boost/serialization/detail/shared_count_132.hpp boost/serialization/detail/shared_count_132.hpp
|
|
|
35 | 35 | #include <functional> // std::less |
36 | 36 | #include <exception> // std::exception |
37 | 37 | #include <new> // std::bad_alloc |
38 | | #include <typeinfo> // std::type_info in get_deleter |
| 38 | #include <boost/detail/sp_typeinfo.hpp> // boost::detail::sp_typeinfo in get_deleter |
39 | 39 | #include <cstddef> // std::size_t |
40 | 40 | |
41 | 41 | #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression |
… |
… |
|
119 | 119 | delete this; |
120 | 120 | } |
121 | 121 | |
122 | | virtual void * get_deleter(std::type_info const & ti) = 0; |
| 122 | virtual void * get_deleter(boost::detail::sp_typeinfo const & ti) = 0; |
123 | 123 | |
124 | 124 | void add_ref_copy() |
125 | 125 | { |
… |
… |
|
269 | 269 | del(ptr); |
270 | 270 | } |
271 | 271 | |
272 | | virtual void * get_deleter(std::type_info const & ti) |
| 272 | virtual void * get_deleter(boost::detail::sp_typeinfo const & ti) |
273 | 273 | { |
274 | | return ti == typeid(D)? &del: 0; |
| 274 | return ti == BOOST_SP_TYPEID(D)? &del: 0; |
275 | 275 | } |
276 | 276 | |
277 | 277 | #if defined(BOOST_SP_USE_STD_ALLOCATOR) |
… |
… |
|
441 | 441 | return std::less<sp_counted_base *>()(a.pi_, b.pi_); |
442 | 442 | } |
443 | 443 | |
444 | | void * get_deleter(std::type_info const & ti) const |
| 444 | void * get_deleter(boost::detail::sp_typeinfo const & ti) const |
445 | 445 | { |
446 | 446 | return pi_? pi_->get_deleter(ti): 0; |
447 | 447 | } |
diff -ru boost/serialization/detail/shared_ptr_132.hpp boost/serialization/detail/shared_ptr_132.hpp
|
|
|
320 | 320 | return pn < rhs.pn; |
321 | 321 | } |
322 | 322 | |
323 | | void * _internal_get_deleter(std::type_info const & ti) const |
| 323 | void * _internal_get_deleter(boost::detail::sp_typeinfo const & ti) const |
324 | 324 | { |
325 | 325 | return pn.get_deleter(ti); |
326 | 326 | } |
… |
… |
|
454 | 454 | |
455 | 455 | template<class D, class T> D * get_deleter(shared_ptr< T > const & p) |
456 | 456 | { |
457 | | void const * q = p._internal_get_deleter(typeid(D)); |
| 457 | void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); |
458 | 458 | return const_cast<D *>(static_cast<D const *>(q)); |
459 | 459 | } |
460 | 460 | |
… |
… |
|
462 | 462 | |
463 | 463 | template<class D, class T> D * get_deleter(shared_ptr< T > const & p) |
464 | 464 | { |
465 | | return static_cast<D *>(p._internal_get_deleter(typeid(D))); |
| 465 | return static_cast<D *>(p._internal_get_deleter(BOOST_SP_TYPEID(D))); |
466 | 466 | } |
467 | 467 | |
468 | 468 | #endif |