4 #ifndef CPPQEDCORE_UTILS_SMARTPTR_H_INCLUDED
5 #define CPPQEDCORE_UTILS_SMARTPTR_H_INCLUDED
7 #include <boost/shared_ptr.hpp>
16 inline void nullDelete (T*) {}
32 const boost::shared_ptr<T>
36 return boost::shared_ptr<T>(t,details::nullDelete<T>);
42 const boost::shared_ptr<const T>
46 return boost::shared_ptr<const T>(t,details::nullDelete<T>);
66 #endif // CPPQEDCORE_UTILS_SMARTPTR_H_INCLUDED
const boost::shared_ptr< const T > nonOwningConstSharedPtr(T *t)
Returns a “non-owning” shared pointer to const that doesn’t do anything on deletion.
const boost::shared_ptr< T > nonOwningSharedPtr(T *t)
Returns a “non-owning” shared pointer that doesn’t do anything on deletion.
Namespace comprising otherwise hard-to-classify generic utilities.
const boost::shared_ptr< T > sharedPointerize(boost::shared_ptr< T > t)
Part of a bundle of functions providing a unified interface to wrap objects into the shared-pointer i...