diff options
Diffstat (limited to 'cpp/src/shared_ptr.h')
| -rw-r--r-- | cpp/src/shared_ptr.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/shared_ptr.h b/cpp/src/shared_ptr.h index c4d547e5bb..df08c325df 100644 --- a/cpp/src/shared_ptr.h +++ b/cpp/src/shared_ptr.h @@ -23,12 +23,20 @@ #include <boost/cast.hpp> namespace qpid { -/// Import shared_ptr definitions into qpid namespace. + +// Import shared_ptr definitions into qpid namespace and define some +// useful shared_ptr templates for convenience. + using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::static_pointer_cast; using boost::const_pointer_cast; using boost::shared_polymorphic_downcast; + +template <class T> shared_ptr<T> make_shared_ptr(T* ptr) { + return shared_ptr<T>(ptr); +} + } // namespace qpid |
