10#ifndef TEUCHOS_RCP_BOOST_SHAREDPTR_CONVERSIONS_HPP
11#define TEUCHOS_RCP_BOOST_SHAREDPTR_CONVERSIONS_HPP
13#include "Teuchos_RCPBoostSharedPtrConversionsDecl.hpp"
24 *rcpd = boost::get_deleter<RCPDeleter<T> >(sptr);
32 RCPNode* existingRCPNode = RCPNodeTracer::getExistingRCPNode(sptr.get());
33 if (existingRCPNode) {
34 return RCP<T>(sptr.get(), RCPNodeHandle(existingRCPNode, RCP_STRONG,
false));
38 return rcpWithDealloc(sptr.get(), DeallocBoostSharedPtr<T>(sptr),
true);
49 Ptr<const DeallocBoostSharedPtr<T> >
50 dbsp = get_optional_dealloc<DeallocBoostSharedPtr<T> >(
rcp);
53 return boost::shared_ptr<T>(
rcp.get(), RCPDeleter<T>(rcp));
55 return boost::shared_ptr<T>();
Reference-counted pointer class and non-member templated function implementations.
Smart reference counting pointer class for automatic garbage collection.
RCP< T > rcpWithDealloc(T *p, Dealloc_T dealloc, bool owns_mem=true)
Initialize from a raw pointer with a deallocation policy.
boost::shared_ptr< T > shared_pointer(const RCP< T > &rcp)
Conversion function that takes in a Teuchos::RCP object and spits out a boost::shared_ptr object.
bool nonnull(const boost::shared_ptr< T > &p)
Returns true if p.get()!=NULL.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.