| 708 | template<class Pointer> |
| 709 | BOOST_MOVE_DOC1ST(void, typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer BOOST_MOVE_I void>::type) |
| 710 | reset(Pointer p) BOOST_NOEXCEPT |
| 711 | { |
| 712 | //If T is not an array type, element_type_t<Pointer> derives from T |
| 713 | //it uses the default deleter and T has no virtual destructor, then you have a problem |
| 714 | BOOST_STATIC_ASSERT(( !bmupd::missing_virtual_destructor |
| 715 | <D, typename bmupd::get_element_type<Pointer>::type>::value )); |
| 716 | pointer tmp = m_data.m_p; |
| 717 | m_data.m_p = p; |
| 718 | if(tmp) m_data.deleter()(tmp); |
| 719 | } |
| 720 | |
| 721 | //! <b>Requires</b>: The expression <tt>get_deleter()(get())</tt> shall be well formed, shall have well-defined behavior, |
| 722 | //! and shall not throw exceptions. |