forked from boostorg/smart_ptr
*_ptr.hpp:
- Added detail::is_pointerlike_helper function templates for Signals weak_ptr.hpp: - Added get_pointer function template for weak_ptr [SVN r15099]
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <boost/checked_delete.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/shared_count.hpp>
|
||||
#include <boost/type_traits/ice.hpp>
|
||||
|
||||
#include <memory> // for std::auto_ptr
|
||||
#include <algorithm> // for std::swap
|
||||
@@ -323,6 +324,12 @@ template<typename T> inline T * get_pointer(shared_ptr<T> const & p)
|
||||
return p.get();
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
// is_pointerlike_helper enables Signals library to recognize shared_ptr
|
||||
template<typename T>
|
||||
type_traits::yes_type is_pointerlike_helper(const shared_ptr<T>&, int);
|
||||
} // end namespace detail
|
||||
|
||||
// shared_from_this() creates a shared_ptr from a raw pointer (usually 'this')
|
||||
|
||||
namespace detail
|
||||
|
||||
Reference in New Issue
Block a user